Revert "Update for cache policy calculation: I think that if SDWebImageDownloade…
…rIgnoreCachedResponse is there, we need NSURLRequestReloadIgnoringLocalCacheData so we always reload." This reverts commit ae75b747.
Showing
1 changed file
with
1 additions
and
8 deletions
@@ -166,14 +166,7 @@ | @@ -166,14 +166,7 @@ | ||
166 | } | 166 | } |
167 | 167 | ||
168 | // In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests if told otherwise | 168 | // In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests if told otherwise |
169 | - NSURLRequestCachePolicy cachePolicy = NSURLRequestReloadIgnoringLocalCacheData; | ||
170 | - if (options & SDWebImageDownloaderUseNSURLCache) { | ||
171 | - if (options & SDWebImageDownloaderIgnoreCachedResponse) { | ||
172 | - cachePolicy = NSURLRequestReloadIgnoringLocalCacheData; | ||
173 | - } else { | ||
174 | - cachePolicy = NSURLRequestUseProtocolCachePolicy; | ||
175 | - } | ||
176 | - } | 169 | + NSURLRequestCachePolicy cachePolicy = options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData; |
177 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url | 170 | NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url |
178 | cachePolicy:cachePolicy | 171 | cachePolicy:cachePolicy |
179 | timeoutInterval:timeoutInterval]; | 172 | timeoutInterval:timeoutInterval]; |
-
Please register or login to post a comment