Skip to content

Commit 556665d

Browse files
committed
Exposed cleanDiskWithCompletionBlock:, added some additional documentation and fixed a typo.
1 parent 87aed00 commit 556665d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

SDWebImage/SDImageCache.h

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca
128128
- (void)removeImageForKey:(NSString *)key;
129129

130130
/**
131-
* Remove the image from memory and optionaly disk cache synchronously
131+
* Remove the image from memory and optionally disk cache synchronously
132132
*
133133
* @param key The unique image cache key
134134
* @param fromDisk Also remove cache entry from disk if YES
@@ -140,14 +140,27 @@ typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType ca
140140
*/
141141
- (void)clearMemory;
142142

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+
143149
/**
144150
* Clear all disk cached images
151+
* @see clearDiskOnCompletion:
145152
*/
146153
- (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;
148160

149161
/**
150162
* Remove all expired cached image from disk
163+
* @see cleanDiskWithCompletionBlock:
151164
*/
152165
- (void)cleanDisk;
153166

0 commit comments

Comments
 (0)