[Firestore] FR: keepSynced - control what gets in the offline cache
See original GitHub issueWhat feature would you like to see?
Something similar to what the Realtime Database offers:
docRef.keepSynced(keepOnlyThisReferenceInLocalCache=true)
This should store ALL data that this document reference contains and remove ALL other data from the cache.
How would you use it?
It would be great to limit the amount of data Firestore syncs and control what gets synced (our users experience cache misses when they are offline, frequently). Our team organized the document model so that every user has its own root that we would like to keep in sync.
That way, one can use the Firestore database as an offline-first solution.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Access data offline | Firestore - Firebase
Cloud Firestore supports offline data persistence. This feature caches a copy of the Cloud Firestore data that your app is actively using, so...
Read more >Firebase does not sync offline cache if the app is killed
According to firebase documentation. Transactions are not persisted across app restarts. Even with persistence enabled, transactions are not persisted ...
Read more >Advanced offline caching techniques in Cloud Firestore
Firestore SDKs implement a caching system that helps to reduce latency, support offline querying and mutations, and reduce billed document ...
Read more >Firestore clients: To cache, or not to cache? (or both?) - Medium
Here's your guide to getting the most out of this cache. ... more caching control, especially to enable a full offline-first experience for...
Read more >Announcing Mobile Offline Support - The Firebase Blog
Announcing Mobile Offline Support. ... Today we're announcing a set of features for our iOS and Android SDKs that ... [ref keepSynced:YES];
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m going to leave this open because we are intending to address this, but we’re not going to do the trivial API sugar that RTDB did so it’s going to be a while before this lands.
Any updates on this? This feature make Firestore to be offline first database in some scenarios