correct cachePolicy constants.

NSMutableURLRequest accepts NSURLRequestCachePolicy as cachePolicy,
not NSURLCacheStoragePolicy.
This commit is contained in:
MIYOKAWA, Nobuyoshi 2013-02-19 13:10:31 +09:00
parent f024890ba7
commit 15c5785320
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ static NSString *const kCompletedCallbackKey = @"completed";
[self addProgressCallback:progressBlock andCompletedBlock:completedBlock forURL:url createCallback:^
{
// In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests
NSMutableURLRequest *request = [NSMutableURLRequest.alloc initWithURL:url cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:15];
NSMutableURLRequest *request = [NSMutableURLRequest.alloc initWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:15];
request.HTTPShouldHandleCookies = NO;
request.HTTPShouldUsePipelining = YES;
request.allHTTPHeaderFields = wself.HTTPHeaders;