From 15c578532077eaf45daa1357fab77f48e8fb7d06 Mon Sep 17 00:00:00 2001 From: "MIYOKAWA, Nobuyoshi" Date: Tue, 19 Feb 2013 13:10:31 +0900 Subject: [PATCH] correct cachePolicy constants. NSMutableURLRequest accepts NSURLRequestCachePolicy as cachePolicy, not NSURLCacheStoragePolicy. --- SDWebImage/SDWebImageDownloader.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/SDWebImageDownloader.m b/SDWebImage/SDWebImageDownloader.m index e8176ea..3401ee4 100644 --- a/SDWebImage/SDWebImageDownloader.m +++ b/SDWebImage/SDWebImageDownloader.m @@ -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;