Authored by Matej Bukovinski

Exposed cleanDiskWithCompletionBlock:, added some additional documentation and fixed a typo.

@@ -128,7 +128,7 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca @@ -128,7 +128,7 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca
128 - (void)removeImageForKey:(NSString *)key; 128 - (void)removeImageForKey:(NSString *)key;
129 129
130 /** 130 /**
131 - * Remove the image from memory and optionaly disk cache synchronously 131 + * Remove the image from memory and optionally disk cache synchronously
132 * 132 *
133 * @param key The unique image cache key 133 * @param key The unique image cache key
134 * @param fromDisk Also remove cache entry from disk if YES 134 * @param fromDisk Also remove cache entry from disk if YES
@@ -141,13 +141,26 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca @@ -141,13 +141,26 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca
141 - (void)clearMemory; 141 - (void)clearMemory;
142 142
143 /** 143 /**
  144 + * Clear all disk cached images. Non-blocking method - returns immediately.
  145 + * @param completionBlock An block that should be executed after cache expiration completes (optional)
  146 + */
  147 +- (void)clearDiskOnCompletion:(void (^)())completion;
  148 +
  149 +/**
144 * Clear all disk cached images 150 * Clear all disk cached images
  151 + * @see clearDiskOnCompletion:
145 */ 152 */
146 - (void)clearDisk; 153 - (void)clearDisk;
147 -- (void)clearDiskOnCompletion:(void (^)())completion; 154 +
  155 +/**
  156 + * Remove all expired cached image from disk. Non-blocking method - returns immediately.
  157 + * @param completionBlock An block that should be executed after cache expiration completes (optional)
  158 + */
  159 +- (void)cleanDiskWithCompletionBlock:(void (^)())completionBlock;
148 160
149 /** 161 /**
150 * Remove all expired cached image from disk 162 * Remove all expired cached image from disk
  163 + * @see cleanDiskWithCompletionBlock:
151 */ 164 */
152 - (void)cleanDisk; 165 - (void)cleanDisk;
153 166