From 556665d8a79714d73eaffad864ecfccecbca2680 Mon Sep 17 00:00:00 2001 From: Matej Bukovinski Date: Mon, 24 Mar 2014 21:14:32 +0100 Subject: [PATCH] Exposed cleanDiskWithCompletionBlock:, added some additional documentation and fixed a typo. --- SDWebImage/SDImageCache.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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;