How to clear the cache image?

I created a sketch using the Three20 package. I have successfully uploaded and displayed images in a view. Now I want to clear the cache images, because each time it only shows the previous cached image, not the updated or last image. All images are retrieved from the RSS feed.

Please help me.

Thank.

+3
source share
2 answers

[[TTURLCache sharedCache] removeAll:YES];?

+3
source

Here are some more TTURLCache methods if you do not want to clear the entire cache:

[[TTURLCache sharedCache] removeURL:@"documents://an_image.jpg" fromDisk:YES];
[[TTURLCache sharedCache] invalidateURL:@"documents://an_image.jpg"];

or

[[TTURLCache sharedCache] removeURL:@"http://example.com/an_image.jpg" fromDisk:YES];
[[TTURLCache sharedCache] invalidateURL:@"http://example.com/an_image.jpg"];
+2
source

Source: https://habr.com/ru/post/1746567/


All Articles