gpt4 book ai didi

ios - 如果有的话,iOS 何时会删除应用程序的缓存文件?

转载 作者:行者123 更新时间:2023-11-29 10:56:06 24 4
gpt4 key购买 nike

我的应用在应用的 Library/Caches 目录中创建和使用缓存文件。操作系统是否曾经管理/删除这些文件,例如,如果设备的存储空间非常短?

我个人从未见过这种情况发生,但客户提出要求,我以前从未想过。

谢谢。

最佳答案

根据File System Programming Guide

On iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is very low on disk space. This will never occur while an app is running. However, you should be aware that iTunes restore is not necessarily the only condition under which the Caches directory can be erased.

所以看起来缓存文件只会在系统还原或内存极低时被删除,但不会删除当前正在运行的应用程序中的文件。

关于ios - 如果有的话,iOS 何时会删除应用程序的缓存文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18363027/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com