Creates a URL cache object with the specified values.
- iOS 2.0–13.0Deprecated
- macOS 10.2–10.15Deprecated
- tvOS 9.0–13.0Deprecated
- watchOS 2.0–6.0Deprecated
The memory capacity of the cache, in bytes.
The disk capacity of the cache, in bytes.
pathis the location at which to store the on-disk cache.
pathis the name of a subdirectory of the application’s default cache directory in which to store the on-disk cache (the subdirectory is created if it does not exist).
The initialized cache object.
The returned cache instance is backed by disk, so you have more leeway when choosing the capacity for this kind of cache. A disk cache measured in the tens of megabytes should be acceptable in most cases.