【发布时间】:2011-02-22 09:04:44
【问题描述】:
我使用 Three20 包创建了缩略图视图。我已成功加载并在视图中显示图像。现在我想清除缓存图像,因为每次它只显示以前缓存的图像,而不是更新或最新的图像。所有图片均从 RSS 提要中检索。
请帮帮我。
谢谢。
【问题讨论】:
我使用 Three20 包创建了缩略图视图。我已成功加载并在视图中显示图像。现在我想清除缓存图像,因为每次它只显示以前缓存的图像,而不是更新或最新的图像。所有图片均从 RSS 提要中检索。
请帮帮我。
谢谢。
【问题讨论】:
[[TTURLCache sharedCache] removeAll:YES];?
【讨论】:
如果您不想清除整个缓存,这里还有几个 TTURLCache 方法:
[[TTURLCache sharedCache] removeURL:@"documents://an_image.jpg" fromDisk:YES];
[[TTURLCache sharedCache] invalidateURL:@"documents://an_image.jpg"];
或
[[TTURLCache sharedCache] removeURL:@"http://example.com/an_image.jpg" fromDisk:YES];
[[TTURLCache sharedCache] invalidateURL:@"http://example.com/an_image.jpg"];
【讨论】: