gpt4 book ai didi

ios - iOS 会自动清理缓存目录吗?

转载 作者:行者123 更新时间:2023-11-28 10:33:42 26 4
gpt4 key购买 nike

我在这个路径上保存媒体文件,我想知道 iOS 会自动清理缓存还是我必须手动清理?

让 documentsUrl = self.fileManager.urls(对于:.cachesDirectory,在:.userDomainMask)。首先!

搜索了一下,没有具体的答案。

最佳答案

如果需要,操作系统可以清除此文件夹。

Documentation

Put data cache files in the Library/Caches/ directory. Cache data can be used for any data that needs to persist longer than temporary data, but not as long as a support file. Generally speaking, the application does not require cache data to operate properly, but it can use cache data to improve performance. Examples of cache data include (but are not limited to) database cache files and transient, downloadable content. Note that the system may delete the Caches/ directory to free up disk space, so your app must be able to re-create or download these files as needed. (emphasis mine)

关于ios - iOS 会自动清理缓存目录吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54746421/

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