android 应用程序沙箱中的缓存文件夹是否可以被OS 自动清除?

Can the cache folder in android application sandbox be cleared automatically by OS?

我在 Android 文档中进行了搜索,但没有发现 Android OS 可能会在设备中没有可用存储空间的情况下清除应用程序缓存这一事实,您怎么办?思考? Android OS有这样的攻略吗?

谢谢。

引用 the documentation for getCacheDir():

The system will automatically delete files in this directory as disk space is needed elsewhere on the device.

所以,是的,Android 将删除缓存文件。