mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-21 02:50:11 +08:00
Log full cached response headers at Trace log level for debugging caching
This commit is contained in:
@@ -147,7 +147,7 @@ static inline NSString * RKDescriptionForRequest(NSURLRequest *request)
|
||||
// Verify that the entry is valid
|
||||
NSHTTPURLResponse *response = (NSHTTPURLResponse *) [cachedResponse response];
|
||||
NSDate *cacheExpirationDate = RKHTTPCacheExpirationDateFromHeadersWithStatusCode([response allHeaderFields], response.statusCode);
|
||||
RKLogDebug(@"Found cached response for request %@ with expiration date: %@", RKDescriptionForRequest(self.request), cacheExpirationDate);
|
||||
RKLogTrace(@"Found cached response for request %@ with expiration date: %@ (cachedResponse.headers=%@)", RKDescriptionForRequest(self.request), cacheExpirationDate, [response allHeaderFields]);
|
||||
if ([(NSDate *)[NSDate date] compare:cacheExpirationDate] == NSOrderedAscending) {
|
||||
return cachedResponse;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user