mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-24 13:28:33 +08:00
Allow Timeout caching and ETag caching to play nice with each other. Update the internal cache date when we get a 304 back.
This commit is contained in:
committed by
Blake Watters
parent
67a6df359d
commit
eea75bdb3c
@@ -22,6 +22,10 @@
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitNetwork
|
||||
|
||||
@interface RKRequest (Private)
|
||||
- (void)updateInternalCacheDate;
|
||||
@end
|
||||
|
||||
@implementation RKObjectLoader
|
||||
|
||||
@synthesize objectManager = _objectManager, response = _response;
|
||||
@@ -321,6 +325,7 @@
|
||||
[_response release];
|
||||
_response = nil;
|
||||
_response = [[[[RKClient sharedClient] cache] responseForRequest:self] retain];
|
||||
[self updateInternalCacheDate];
|
||||
}
|
||||
|
||||
if (![_response wasLoadedFromCache] && [_response isSuccessful] && (_cachePolicy != RKRequestCachePolicyNone)) {
|
||||
|
||||
Reference in New Issue
Block a user