标签:
NSURLCache *cache = [NSURLCache sharedURLCache];
cache.memoryCapacity = 2 * 1024 * 1024;
cache.diskCapacity = 20 * 1024 *1024;
NSCachedURLResponse *response = [cache cachedResponseForRequest:request];
if (response) {
// NSLog(@"data:%@", response.data);
id cacheResult = [NSJSONSerialization JSONObjectWithData:response.data options:NSJSONReadingMutableContainers error:nil];
NSLog(@"cacheResult: %@", cacheResult);
}
标签:
原文地址:http://www.cnblogs.com/lidongxiao/p/4849371.html