Revert "Update for cache policy calculation: I think that if SDWebImageDownloaderIgnoreCachedResponse is there, we need NSURLRequestReloadIgnoringLocalCacheData so we always reload."

This reverts commit ae75b747b0.
This commit is contained in:
Bogdan Poplauschi 2017-08-11 18:00:59 +03:00
parent ae75b747b0
commit 79124e1bab
1 changed files with 1 additions and 8 deletions

View File

@ -166,14 +166,7 @@
}
// In order to prevent from potential duplicate caching (NSURLCache + SDImageCache) we disable the cache for image requests if told otherwise
NSURLRequestCachePolicy cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
if (options & SDWebImageDownloaderUseNSURLCache) {
if (options & SDWebImageDownloaderIgnoreCachedResponse) {
cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
} else {
cachePolicy = NSURLRequestUseProtocolCachePolicy;
}
}
NSURLRequestCachePolicy cachePolicy = options & SDWebImageDownloaderUseNSURLCache ? NSURLRequestUseProtocolCachePolicy : NSURLRequestReloadIgnoringLocalCacheData;
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url
cachePolicy:cachePolicy
timeoutInterval:timeoutInterval];