How to clear cache image?

2019-04-10 17:05发布

I have created thumbnail view using Three20 bundle. I have successfully loaded 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.

2条回答
小情绪 Triste *
2楼-- · 2019-04-10 17:21

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"];
查看更多
混吃等死
3楼-- · 2019-04-10 17:27

[[TTURLCache sharedCache] removeAll:YES];?

查看更多
登录 后发表回答