Refactor cacheClearBy property name

This commit is contained in:
Paul Lavoine 2018-06-23 08:58:06 +02:00
parent 5408da630c
commit 268d6d607a
3 changed files with 3 additions and 3 deletions

View File

@ -609,7 +609,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
// Compute content date key to be used for tests
NSURLResourceKey cacheContentDateKey = NSURLContentModificationDateKey;
switch (self.config.cacheClearBy) {
switch (self.config.diskCacheExpireType) {
case SDImageCacheConfigExpireTypeAccessDate:
cacheContentDateKey = NSURLContentAccessDateKey;
break;

View File

@ -64,6 +64,6 @@ typedef NS_ENUM(NSUInteger, SDImageCacheConfigExpireType) {
* The attribute which the clear cache will be checked against when clearing the disk cache
* Default is Modified Date
*/
@property (assign, nonatomic) SDImageCacheConfigExpireType cacheClearBy;
@property (assign, nonatomic) SDImageCacheConfigExpireType diskCacheExpireType;
@end

View File

@ -21,7 +21,7 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
_diskCacheWritingOptions = NSDataWritingAtomic;
_maxCacheAge = kDefaultCacheMaxCacheAge;
_maxCacheSize = 0;
_cacheClearBy = SDImageCacheConfigExpireTypeModificationDate;
_diskCacheExpireType = SDImageCacheConfigExpireTypeModificationDate;
}
return self;
}