How to clear cache image?
I have created thumbnail view using Three20 bundle. I have successfully loade开发者_运维百科d and displayed the images in the view. Now i want to clear the cache images because everytime it shows only the previously cached image and not the updated or latest image. All images are retrieved from the RSS feed.
Please help me out.
Thanks.
[[TTURLCache sharedCache] removeAll:YES];
?
Here are a couple of more TTURLCache methods if you don't 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"];
精彩评论