diff --git a/SDWebImage/Core/SDDiskCache.m b/SDWebImage/Core/SDDiskCache.m index 1dd9e10b..d7308dcc 100644 --- a/SDWebImage/Core/SDDiskCache.m +++ b/SDWebImage/Core/SDDiskCache.m @@ -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; } diff --git a/SDWebImage/Core/SDImageCacheConfig.h b/SDWebImage/Core/SDImageCacheConfig.h index 460fd06b..e77e128c 100644 --- a/SDWebImage/Core/SDImageCacheConfig.h +++ b/SDWebImage/Core/SDImageCacheConfig.h @@ -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, }; /**