问题
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