Support to use the creation date and the change date to determine the disk cache expire date compare
This commit is contained in:
parent
69a62ff39d
commit
f041dcabef
|
@ -146,11 +146,15 @@ static NSString * const SDDiskCacheExtendedAttributeName = @"com.hackemist.SDDis
|
|||
case SDImageCacheConfigExpireTypeAccessDate:
|
||||
cacheContentDateKey = NSURLContentAccessDateKey;
|
||||
break;
|
||||
|
||||
case SDImageCacheConfigExpireTypeModificationDate:
|
||||
cacheContentDateKey = NSURLContentModificationDateKey;
|
||||
break;
|
||||
|
||||
case SDImageCacheConfigExpireTypeCreationDate:
|
||||
cacheContentDateKey = NSURLCreationDateKey;
|
||||
break;
|
||||
case SDImageCacheConfigExpireTypeChangeDate:
|
||||
cacheContentDateKey = NSURLAttributeModificationDateKey;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -12,13 +12,21 @@
|
|||
/// Image Cache Expire Type
|
||||
typedef NS_ENUM(NSUInteger, SDImageCacheConfigExpireType) {
|
||||
/**
|
||||
* When the image is accessed it will update this value
|
||||
* When the image cache is accessed it will update this value
|
||||
*/
|
||||
SDImageCacheConfigExpireTypeAccessDate,
|
||||
/**
|
||||
* The image was obtained from the disk cache (Default)
|
||||
* When the image cache is created or modified it will update this value (Default)
|
||||
*/
|
||||
SDImageCacheConfigExpireTypeModificationDate
|
||||
SDImageCacheConfigExpireTypeModificationDate,
|
||||
/**
|
||||
* When the image cache is created it will update this value
|
||||
*/
|
||||
SDImageCacheConfigExpireTypeCreationDate,
|
||||
/**
|
||||
* When the image cache is created, modified, renamed, file attribute updated (like permission, xattr) it will update this value
|
||||
*/
|
||||
SDImageCacheConfigExpireTypeChangeDate,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue