Initializes an NSURLCache object with the specified values.
- iOS 2.0+
- macOS 10.2+
- tvOS 9.0+
- watchOS 2.0+
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 NSURLCache object.
The returned NSURLCache is backed by disk, so developers can be more liberal with space when choosing the capacity for this kind of cache. A disk cache measured in the tens of megabytes should be acceptable in most cases.