, ASICacheDelegate.h , :
// Cache storage policies control whether cached data persists between application launches (ASICachePermanentlyCacheStoragePolicy) or not (ASICacheForSessionDurationCacheStoragePolicy)
// Calling [ASIHTTPRequest clearSession] will remove any data stored using ASICacheForSessionDurationCacheStoragePolicy
typedef enum _ASICacheStoragePolicy {
ASICacheForSessionDurationCacheStoragePolicy = 0,
ASICachePermanentlyCacheStoragePolicy = 1
} ASICacheStoragePolicy;
Originate , AFNetworking NSURLCache.
, ,
, AFNetworking
, ASI, , ( ).
NSURLCache ( reset ) , .
, NSURLCache ASICacheForSessionDurationCacheStoragePolicy.
ASICachePermanentlyCacheStoragePolicy:
NSURLCache *sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:2 * 1024 * 1024
diskCapacity:100 * 1024 * 1024
diskPath:nil];
[NSURLCache setSharedURLCache:sharedCache];
, - [ASIHTTPRequest clearSession] , " NSURLCache Ultimate Control".
AFAIK, , API AFNetworking, :)
source
share