We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
SDWebImageRefreshCached
1 parent 9b574e5 commit a3e3c61Copy full SHA for a3e3c61
SDWebImage/SDWebImageManager.m
@@ -129,7 +129,14 @@ - (NSString *)cacheKeyForURL:(NSURL *)url
129
}
130
else
131
{
132
- const BOOL cacheOnDisk = !(options & SDWebImageCacheMemoryOnly);
+ BOOL cacheOnDisk = !(options & SDWebImageCacheMemoryOnly);
133
+
134
+ if (options & SDWebImageRefreshCached)
135
+ {
136
+ // When SDWebImageRefreshCached option is enabled, the disk caching relies on NSURLCache one.
137
+ // We thus fork SDWebImage cache to be disabled so we don't duplicate the required storage space for nothing.
138
+ cacheOnDisk = NO;
139
+ }
140
141
if (downloadedImage && [self.delegate respondsToSelector:@selector(imageManager:transformDownloadedImage:withURL:)])
142
0 commit comments