我应该自己清除fsCachedData文件夹吗? [英] Should I clear the fsCachedData folder myself?

查看:1111
本文介绍了我应该自己清除fsCachedData文件夹吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在加载大量图片:

var data = NSData.FromUrl (NSUrl.FromString(url));
var img = UIImage.LoadFromData(data);

然后我将图像缓存到一个文件夹,并确保每隔7天清除一次该文件夹。

Then I cache the images to a folder and make sure this folder is purged every 7 days.

但是我看到还有一个包含所有图像的Caches /'应用程序包名称'/ fsCachedData文件夹。这似乎至少在模拟器中没有被清除。我也应该清除这个吗?有没有办法阻止它在这里缓存图像?或者我自己删除文件夹是否安全?

But I see there is also a "Caches/'app package name'/fsCachedData" folder with all the images. This doesn't seem to be cleared in the simulator at least. Should I clear this as well? Is there any way to prevent it from caching images here? Or is it safe to delete the folder myself?

推荐答案

我们在其中一个应用程序中也看到了这一点。根据此链接,它是一个iOS 8错误Apple将在今天的iOS 8.1更新中更正。

We are seeing this in one of our apps as well. According to this link, its an iOS 8 bug which Apple will have corrected in the iOS 8.1 update today.

所以回答你的问题:不,你不应该自己删除缓存并运气好Apple's修复真的会清理旧数据。如果由于某种原因没有,你应该能够自己删除它没有任何问题。

So to answer your question: No, you shouldn't have to delete the cache yourself and with some luck Apple's fix really will clean up the old data. If for some reason not, you should be able to delete it yourself without any problems.

我已经确认iOS 8.1确实解决了这个问题。用户必须在更新后启动应用程序一次,以便清除缓存。

I've verified that iOS 8.1 does indeed correct the issue. The user must launch the app once after update for the cache to be cleared however.

这篇关于我应该自己清除fsCachedData文件夹吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆