init(memoryCapacity:diskCapacity:directory:)
Creates a URL cache object with the specified memory and disk capacities, in the specified directory.
Declaration
convenience init(memoryCapacity: Int, diskCapacity: Int, directory: URL? = nil)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
directoryisnil, the cache uses a default directory.
Discussion
A disk cache measured in the tens of megabytes is acceptable in most cases.