Up
Authors
- Generated by fedor
-
- Declared in:
- Foundation/NSURLCache.h
- Conforms to:
- NSCoding
- NSCopying
Availability: MacOS-X 10.2.0, Base 1.13.0
Encapsulates a cached response to a URL load
request.
Instance Variables
Method summary
- (
NSData*)
data;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the data with which the receiver was
initialised.
- (id)
initWithResponse: (
NSURLResponse*)response
data: (
NSData*)data;
Availability: MacOS-X 10.2.0, Base 1.13.0
Uses the NSURLCacheStorageAllowed policy to cache the
specified response and data
.
Returns the cached response.
- (
NSURLResponse*)
response;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the response with which the receiver was
initialised.
- (
NSURLCacheStoragePolicy)
storagePolicy;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the storage policy with which the receiver
was initialised.
- (
NSDictionary*)
userInfo;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the user info dictionary with which the
receiver was initialised (if any).
Instance Variables for NSCachedURLResponse Class
@protected void* _NSCachedURLResponseInternal;
Availability: MacOS-X 10.2.0, Base 1.13.0
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- Foundation/NSURLCache.h
Availability: MacOS-X 10.2.0, Base 1.13.0
Description forthcoming.
Instance Variables
Method summary
+ (void)
setSharedURLCache: (
NSURLCache*)cache;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the shared
NSURLCache
used throughout the process.
If you are going
to call this method to specify an alternative to the
default
cache, you should do so before
the shared
cache is used in order to avoid
loss of data that was in the old
cache.
+ (
NSURLCache*)
sharedURLCache;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the shared cache instance set by
+setSharedURLCache:
or, if none has been set, returns an instance
initialised with
- Memory capacity
-
4 megabytes
- Disk capacity
-
20 megabytes
- Disk path
-
user-library-path/Caches/current-app-name
- (
NSUInteger)
currentDiskUsage;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the current size (butes) of the data stored
in the on-disk cache.
- (
NSUInteger)
currentMemoryUsage;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the current size (butes) of the data stored
in the in-memory cache.
- (
NSUInteger)
diskCapacity;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the disk capacity (in bytes) of the cache.
- (id)
initWithMemoryCapacity: (
NSUInteger)memoryCapacity
diskCapacity: (
NSUInteger)diskCapacity
diskPath: (
NSString*)path;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the receiver initialised with the specified
capacities (in bytes) and using the specified
location on disk for persistent storage.
- (
NSUInteger)
memoryCapacity;
Availability: MacOS-X 10.2.0, Base 1.13.0
Returns the memory capacity (in bytes) of the
cache.
- (void)
removeAllCachedResponses;
Availability: MacOS-X 10.2.0, Base 1.13.0
Empties the cache.
- (void)
removeCachedResponseForRequest: (
NSURLRequest*)request;
Availability: MacOS-X 10.2.0, Base 1.13.0
Removes from the cache (if present) the
NSCachedURLResponse
which was stored using the specified
request.
- (void)
setDiskCapacity: (
NSUInteger)diskCapacity;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the disk capacity (in bytes) truncating cache
contents if necessary.
- (void)
setMemoryCapacity: (
NSUInteger)memoryCapacity;
Availability: MacOS-X 10.2.0, Base 1.13.0
Sets the memory capacity (in bytes) truncating cache
contents if necessary.
- (void)
storeCachedResponse: (
NSCachedURLResponse*)cachedResponse
forRequest: (
NSURLRequest*)request;
Availability: MacOS-X 10.2.0, Base 1.13.0
Stores cachedResponse in the cache, keyed
on request.
Replaces any existing
response with the same key.
Instance Variables for NSURLCache Class
@protected void* _NSURLCacheInternal;
Availability: MacOS-X 10.2.0, Base 1.13.0
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Up