SDWebImage clears cache with tag for image set

I am using an awesome project SDWebImageto update the loading of the image that I am using:

[[SDImageCache sharedImageCache] removeImageForKey:img_key fromDisk:YES];

and it works, but I want to know if it is possible to give a tag for some images, so I can clear the cache for a set of images, and not just for one, is this possible?

+4
source share
2 answers

SDImageCache has an init method named - (id)initWithNamespace:(NSString *)ns;

you can use it to start a new instance instead sharedImageCache, so you can clearDisk, clearMemorynot to influence others.

+3
source

, SDImageCache memCache (NSCache). . / , .

- (void)clearMemory;
- (void)clearDisk;

nscache , . SDImageCache.

0

All Articles