Tom*_*you 16 firebase google-cloud-firestore
我的iOS应用程序的firestore缓存似乎与Firestore不同步.结果我不得不禁用持久性.无论如何重置缓存?有没有办法确保它不断同步?我所做的只是从数据库中删除文件!
Rya*_*lor 17
API 中现在有一个用于清除持久性的功能。除了测试外,不建议用于任何其他用途,但您可以使用
firebase.firestore().clearPersistence().catch(error => {
console.error('Could not enable persistence:', error.code);
})
Run Code Online (Sandbox Code Playgroud)
它必须在使用 Firestore 数据库之前运行。
| 归档时间: |
|
| 查看次数: |
3281 次 |
| 最近记录: |