#import "SDImageCache.h"
// Calculate the size of SDWebImage's local cache image
+ (NSString *)getCacheSize {
float tmpSize = [[SDImageCache sharedImageCache] getSize];
NSLog(@"%f",tmpSize);
NSString *size =
tmpSize/1024 <= 1024 ?
[NSString stringWithFormat:@"%.1fK",tmpSize/1024] :
[NSString stringWithFormat:@"%.1fM",tmpSize/1024/1024];
return size;
}
// clear image cache
+(void)clearDisk{
[[ SDImageCache sharedImageCache ] clearDisk ]; // Clear locally cached images
[[ SDImageCache sharedImageCache ] clearMemory ]; // clear the memory image
}