简体   繁体   English

Android 上的 firestore 存储缓存在哪里?

[英]Where does firestore store cache on Android?

I am using firestore with an Android app and I was testing my "offline mode".我将 firestore 与 Android 应用程序一起使用,并且正在测试我的“离线模式”。 I was trying to delete cached data without code and I couldn't.我试图在没有代码的情况下删除缓存数据,但我做不到。 I tried to "force close" my app, and I even tried the "Clear Cache" option within the Android's app info page, and no luck.我试图“强制关闭”我的应用程序,我什至尝试了 Android 应用程序信息页面中的“清除缓存”选项,但没有成功。

Do you know where does firestore store cache?您知道 firestore 存储缓存在哪里吗? Is "Clear Storage" the only solution to completely delete cache with no code? “Clear Storage”是唯一无需代码即可完全删除缓存的解决方案吗? I'm using a OnePlus 6 device with android 10.我正在使用带有 android 10 的 OnePlus 6 设备。

Thanks!谢谢!

Firestore uses SQLite as its persistence layer. Firestore 使用 SQLite 作为其持久层。 The database is stored in the usual area for persistent databases, which is not in the app "cache" folder.数据库存储在持久数据库的常用区域,而不是应用程序的“缓存”文件夹中。 You will indeed have to wipe the entire app storage if you want to remove Firestore's cache.如果你想删除 Firestore 的缓存,你确实需要擦除整个应用程序存储。

The SDK does provide a method to clear persistence , but you should be aware that this is for testing only and should not be used in a shipping app. SDK 确实提供了清除持久性的方法,但您应该知道这仅用于测试,不应在发布应用程序中使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM