mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-22 20:18:53 +08:00
Disabled invalid caching behavior for PUT & POST responses. fixes #589
This commit is contained in:
@@ -555,10 +555,7 @@ typedef void(^RKRequestDidFailLoadWithErrorBlock)(NSError *error);
|
||||
/**
|
||||
Returns YES if the request is cacheable
|
||||
|
||||
All requests are considered cacheable unless:
|
||||
|
||||
- The method is DELETE
|
||||
- The request body is a stream (i.e. using RKParams)
|
||||
Only GET requests are considered cacheable (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html).
|
||||
*/
|
||||
- (BOOL)isCacheable;
|
||||
|
||||
|
||||
@@ -784,12 +784,7 @@ RKRequestMethod RKRequestMethodTypeFromName(NSString *methodName) {
|
||||
}
|
||||
|
||||
- (BOOL)isCacheable {
|
||||
// DELETE is not cacheable
|
||||
if (_method == RKRequestMethodDELETE) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
return _method == RKRequestMethodGET;
|
||||
}
|
||||
|
||||
- (NSString*)cacheKey {
|
||||
|
||||
Reference in New Issue
Block a user