Authored by Bogdan Poplauschi

Got rid of `removeImageForKey:` and `removeImageForKey:fromDisk:` that looked sy…

…nc but were async. Left only the 2 async ones
@@ -184,13 +184,6 @@ typedef void(^SDWebImageCalculateSizeBlock)(NSUInteger fileCount, NSUInteger tot @@ -184,13 +184,6 @@ typedef void(^SDWebImageCalculateSizeBlock)(NSUInteger fileCount, NSUInteger tot
184 /** 184 /**
185 * Remove the image from memory and disk cache asynchronously 185 * Remove the image from memory and disk cache asynchronously
186 * 186 *
187 - * @param key The unique image cache key  
188 - */  
189 -- (void)removeImageForKey:(nullable NSString *)key;  
190 -  
191 -/**  
192 - * Remove the image from memory and disk cache asynchronously  
193 - *  
194 * @param key The unique image cache key 187 * @param key The unique image cache key
195 * @param completion A block that should be executed after the image has been removed (optional) 188 * @param completion A block that should be executed after the image has been removed (optional)
196 */ 189 */
@@ -199,14 +192,6 @@ typedef void(^SDWebImageCalculateSizeBlock)(NSUInteger fileCount, NSUInteger tot @@ -199,14 +192,6 @@ typedef void(^SDWebImageCalculateSizeBlock)(NSUInteger fileCount, NSUInteger tot
199 /** 192 /**
200 * Remove the image from memory and optionally disk cache asynchronously 193 * Remove the image from memory and optionally disk cache asynchronously
201 * 194 *
202 - * @param key The unique image cache key  
203 - * @param fromDisk Also remove cache entry from disk if YES  
204 - */  
205 -- (void)removeImageForKey:(nullable NSString *)key fromDisk:(BOOL)fromDisk;  
206 -  
207 -/**  
208 - * Remove the image from memory and optionally disk cache asynchronously  
209 - *  
210 * @param key The unique image cache key 195 * @param key The unique image cache key
211 * @param fromDisk Also remove cache entry from disk if YES 196 * @param fromDisk Also remove cache entry from disk if YES
212 * @param completion A block that should be executed after the image has been removed (optional) 197 * @param completion A block that should be executed after the image has been removed (optional)
@@ -404,20 +404,11 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) { @@ -404,20 +404,11 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
404 404
405 #pragma mark - Remove Ops 405 #pragma mark - Remove Ops
406 406
407 -- (void)removeImageForKey:(nullable NSString *)key {  
408 - [self removeImageForKey:key withCompletion:nil];  
409 -}  
410 -  
411 - (void)removeImageForKey:(nullable NSString *)key withCompletion:(nullable SDWebImageNoParamsBlock)completion { 407 - (void)removeImageForKey:(nullable NSString *)key withCompletion:(nullable SDWebImageNoParamsBlock)completion {
412 [self removeImageForKey:key fromDisk:YES withCompletion:completion]; 408 [self removeImageForKey:key fromDisk:YES withCompletion:completion];
413 } 409 }
414 410
415 -- (void)removeImageForKey:(nullable NSString *)key fromDisk:(BOOL)fromDisk {  
416 - [self removeImageForKey:key fromDisk:fromDisk withCompletion:nil];  
417 -}  
418 -  
419 - (void)removeImageForKey:(nullable NSString *)key fromDisk:(BOOL)fromDisk withCompletion:(nullable SDWebImageNoParamsBlock)completion { 411 - (void)removeImageForKey:(nullable NSString *)key fromDisk:(BOOL)fromDisk withCompletion:(nullable SDWebImageNoParamsBlock)completion {
420 -  
421 if (key == nil) { 412 if (key == nil) {
422 return; 413 return;
423 } 414 }