Partial offline sync in Firebase Cloud Firestore

依然范特西╮ 提交于 2019-12-11 17:25:10

问题


I want to offline sync some collections in Firebase Cloud Firestore to Android phone local store.

Some collections(E.g. log data) size are too large and are not needed to sync to phone local store.

Anyone can provide guidance for this?


回答1:


Your client will only persist those documents that it has previously read. It won't be an entire collection unless all those documents were read, and only up to a reasonable limit. Old documents will be evicted from the cache when new documents are read.

Since you haven't really voiced your specific concern about what might happen with offline caches, I'll assuming that you haven't actually observed any negative behavior, and you are just concerned that a large collection will not cause your app problems.



来源:https://stackoverflow.com/questions/48555733/partial-offline-sync-in-firebase-cloud-firestore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!