Should I clear the fsCachedData folder myself?

南笙酒味 提交于 2019-12-22 10:54:45

问题


I am loading a lot of images with:

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

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

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?


回答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.

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.

[Edit] 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.



来源:https://stackoverflow.com/questions/26233870/should-i-clear-the-fscacheddata-folder-myself

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!