shared
TypeScriptstatic get shared(): URLCacheSwift declarationclass var shared: URLCache { get set }class · iOS 2.0+ · SDK 27.1
class URLCachestatic get shared(): URLCacheSwift declarationclass var shared: URLCache { get set }static set shared(value: URLCache)Swift declarationclass var shared: URLCache { get set }cachedResponse(request: URLRequest): (CachedURLResponse) | nullSwift declarationfunc cachedResponse(for request: URLRequest) -> CachedURLResponse?getCachedResponse(dataTask: URLSessionDataTask, completionHandler: ((arg0: (CachedURLResponse) | null) => void)): voidSwift declarationfunc cachedResponse(for dataTask: URLSessionDataTask) async -> CachedURLResponse?static initMemoryCapacityDiskCapacityDiskPath(memoryCapacity: number, diskCapacity: number, path?: (string) | null): URLCacheSwift declarationinit(memoryCapacity: Int, diskCapacity: Int, diskPath path: String?)removeAllCachedResponses(): voidSwift declarationfunc removeAllCachedResponses()removeCachedResponseFor(dataTask: URLSessionDataTask): voidSwift declarationfunc removeCachedResponse(for dataTask: URLSessionDataTask)removeCachedResponseFor37233(request: URLRequest): voidSwift declarationfunc removeCachedResponse(for request: URLRequest)removeCachedResponses(date: globalThis.Date): voidSwift declarationfunc removeCachedResponses(since date: Date)storeCachedResponseFor(cachedResponse: CachedURLResponse, dataTask: URLSessionDataTask): voidSwift declarationfunc storeCachedResponse(_ cachedResponse: CachedURLResponse, for dataTask: URLSessionDataTask)storeCachedResponseFor2692(cachedResponse: CachedURLResponse, request: URLRequest): voidSwift declarationfunc storeCachedResponse(_ cachedResponse: CachedURLResponse, for request: URLRequest)get currentDiskUsage(): numberSwift declarationvar currentDiskUsage: Int { get }get currentMemoryUsage(): numberSwift declarationvar currentMemoryUsage: Int { get }get diskCapacity(): numberSwift declarationvar diskCapacity: Int { get set }set diskCapacity(value: number)Swift declarationvar diskCapacity: Int { get set }get memoryCapacity(): numberSwift declarationvar memoryCapacity: Int { get set }set memoryCapacity(value: number)Swift declarationvar memoryCapacity: Int { get set }static initMemoryCapacityDiskCapacityDirectory(memoryCapacity: number, diskCapacity: number, directory?: (string) | null): URLCacheSwift declarationconvenience init(memoryCapacity: Int, diskCapacity: Int, directory: URL? = nil)Creates a URL cache object with the specified memory and disk capacities, in the specified directory. A disk cache measured in the tens of megabytes is acceptable in most cases. - Parameters: - memoryCapacity: The memory capacity of the cache, in bytes. - diskCapacity: The disk capacity of the cache, in bytes. - directory: The path to an on-disk directory, where the system stores the on-disk cache. If `nil`, the cache uses a default directory.
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
URLCache.init()
inherited init: cannot prove legal (class declares 2 custom initializers)