diff --git a/SDWebImage/SDImageCache.h b/SDWebImage/SDImageCache.h index 8989a18..2e1eed5 100644 --- a/SDWebImage/SDImageCache.h +++ b/SDWebImage/SDImageCache.h @@ -128,7 +128,7 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca - (void)removeImageForKey:(NSString *)key; /** - * Remove the image from memory and optionaly disk cache synchronously + * Remove the image from memory and optionally disk cache synchronously * * @param key The unique image cache key * @param fromDisk Also remove cache entry from disk if YES @@ -141,13 +141,26 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca - (void)clearMemory; /** - * Clear all disk cached images + * Clear all disk cached images. Non-blocking method - returns immediately. + * @param completionBlock An block that should be executed after cache expiration completes (optional) */ -- (void)clearDisk; - (void)clearDiskOnCompletion:(void (^)())completion; +/** + * Clear all disk cached images + * @see clearDiskOnCompletion: + */ +- (void)clearDisk; + +/** + * Remove all expired cached image from disk. Non-blocking method - returns immediately. + * @param completionBlock An block that should be executed after cache expiration completes (optional) + */ +- (void)cleanDiskWithCompletionBlock:(void (^)())completionBlock; + /** * Remove all expired cached image from disk + * @see cleanDiskWithCompletionBlock: */ - (void)cleanDisk;