firebase / firebase/firebase-android-sdk

[Firestore] FR: keepSynced - control what gets in the offline cache

Open
#5 8 comments 8 reactions 0 assignees View on GitHub
api: firestore type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 9h
Merged PRs (30d)
31

Description

## What 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.