Class NSURLCache

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol

public class NSURLCache
extends NSObject
  • Constructor Details

    • NSURLCache

      public NSURLCache()
    • NSURLCache

      protected NSURLCache​(NSObject.Handle h, long handle)
    • NSURLCache

      protected NSURLCache​(NSObject.SkipInit skipInit)
    • NSURLCache

      @Deprecated public NSURLCache​(long memoryCapacity, long diskCapacity, String path)
      Deprecated.
      Use initWithMemoryCapacity:diskCapacity:directoryURL:
    • NSURLCache

      public NSURLCache​(long memoryCapacity, long diskCapacity, NSURL directoryURL)
      Since:
      Available in iOS 13.0 and later.
  • Method Details

    • getSharedURLCache

      public static NSURLCache getSharedURLCache()
    • setSharedURLCache

      public static void setSharedURLCache​(NSURLCache v)
    • getMemoryCapacity

      public long getMemoryCapacity()
    • setMemoryCapacity

      public void setMemoryCapacity​(long v)
    • getDiskCapacity

      public long getDiskCapacity()
    • setDiskCapacity

      public void setDiskCapacity​(long v)
    • getCurrentMemoryUsage

      public long getCurrentMemoryUsage()
    • getCurrentDiskUsage

      public long getCurrentDiskUsage()
    • init

      @Deprecated protected long init​(long memoryCapacity, long diskCapacity, String path)
      Deprecated.
      Use initWithMemoryCapacity:diskCapacity:directoryURL:
    • init

      protected long init​(long memoryCapacity, long diskCapacity, NSURL directoryURL)
      Since:
      Available in iOS 13.0 and later.
    • getCachedResponse

      public NSCachedURLResponse getCachedResponse​(NSURLRequest request)
    • storeCachedResponse

      public void storeCachedResponse​(NSCachedURLResponse cachedResponse, NSURLRequest request)
    • removeCachedResponse

      public void removeCachedResponse​(NSURLRequest request)
    • removeAllCachedResponses

      public void removeAllCachedResponses()
    • removeCachedResponsesSinceDate

      public void removeCachedResponsesSinceDate​(NSDate date)
    • storeCachedResponse

      public void storeCachedResponse​(NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask)
    • getCachedResponse

      public void getCachedResponse​(NSURLSessionDataTask dataTask, VoidBlock1<NSCachedURLResponse> completionHandler)
    • removeCachedResponse

      public void removeCachedResponse​(NSURLSessionDataTask dataTask)