2

I know iOS may delete app's cache when memory becomes an issue, and will not do so while the app is running. My question is whether it can delete only part of an app's cache folder, leaving it with only some of the data that was stored there, or when it decides to delete it clears all of the cache's folder content?

Thank you all for helping.

gioravered
  • 1,758
  • 3
  • 19
  • 30

1 Answers1

2

The only official documentation from Apple is in QA 1719:

iOS will delete your files from the Caches directory when necessary, so your app will need to degrade gracefully if its data files are deleted.

What it actually does in practice should be considered an implementation detail subject to change without notice between System versions, so your proper course of action would be to assume that any individual file can disappear without notice.

That said, I'd be mildly surprised if in practice the implemented behaviour wasn't to blow the whole folder away, that being much quicker than deleting individual files no doubt.

Alex Curylo
  • 4,744
  • 1
  • 27
  • 37
  • I agree that the main point is that an app should work regardless of what is done. The app should handle individual files being gone as well as the whole Caches folder being emptied. – rmaddy Jun 06 '16 at 16:42
  • Thanks, I hoped for a different answer haha :) – gioravered Jun 07 '16 at 07:22