Refactor cacheClearBy property name
This commit is contained in:
parent
5408da630c
commit
268d6d607a
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue