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:
Jeremy Ellison
2011-06-28 11:44:55 -04:00
committed by Blake Watters
parent 67a6df359d
commit eea75bdb3c
5 changed files with 88 additions and 12 deletions

View File

@@ -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)) {