什么时候NSCachesDirectory文件被删除? [英] When are files from NSCachesDirectory removed?
问题描述
我们的经验是,这个文件夹得到清除应用程序更新。这将是很高兴知道什么时候这个文件夹是一个候选人被清除。文档描述这个文件夹为
lockquote
可放弃缓存文件的位置(Library / Caches)
$ b $ NSDocumentDirectory
在应用程序更新时不会被清除,但要小心使用此文件夹,因为iOS 5现在使用此文件夹进行备份如果您使用此目录存储用户生成的内容以外的任何内容,则iCloud和您的应用可能会被拒绝。
In what circumstances would files in the iOS NSCachesDirectory get removed? Obviously, delete and reinstall an application. What about application upgrade? What about low disk space conditions? Anything else?
Our experience is that this folder gets cleared on app updates. It would be nice to know when exactly this folder is a candidate for being cleared. The docs describe this folder as
location of discardable cache files (Library/Caches)
The NSDocumentDirectory
will not be cleared on app updates but be careful using this folder since iOS 5 now uses this folder for backing up in iCloud and your app will likely be rejected if you use this directory to store anything other then user generated content.
这篇关于什么时候NSCachesDirectory文件被删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!