开发者

Is Library/Caches cleared automatically by the iPhoneOS?

开发者 https://www.devze.com 2022-12-16 21:02 出处:网络
I have an app that will need to cache some images. I have read some documentation about caching, and the logical thing to do is to cache my images within the Library/Caches directory within my app\'s

I have an app that will need to cache some images.

I have read some documentation about caching, and the logical thing to do is to cache my images within the Library/Caches directory within my app's sandbox.

I understand that the reason for storing caches images here are:

That second point is what I'm questioning...

  • Is this true?
  • Does the OS clear the caches directory automatically?
  • Will I need any of my own logic to detect if the cache is too big and to clear the oldest items?


I found this in the documentation:

Use this directory to write any application-specific support files that you want to persist between launches of the application. Your application is generally responsible for adding and removing these files. However, iTunes removes these files during a full restore of the device so you should be able to recreate them as needed. To access this directory, use the interfaces described in “Getting Paths to Application Directories” to get the path to the directory. In iPhone OS 2.2 and later, the contents of this directory are not backed up by iTunes.

http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/FilesandNetworking/FilesandNetworking.html

0

精彩评论

暂无评论...
验证码 换一张
取 消