Reputation: 125
It is about Firebase's local cached data in Android.
If the Android user, has 1-2 years data in Firebase, is there a way to enable, setup, or filter Firebase persistence in local, so that it only create local cache for the last month ?
So we don't the whole data in local cache, but only the last month.
Upvotes: 0
Views: 137
Reputation: 317968
The Firebase local cache is not designed to be manually populated. It's managed automatically, and you don't have much control over what gets stored in it. It will store data from recent queries, and it will evict data that hasn't been used. You can't choose which data will or will not be cached - it work with everything or nothing at all.
The local cache is meant to be helpful when the user temporarily loses their network connection. It's not meant for full offline support.
If you need a cache for very specific data that you can control, you will need to build that yourself.
Upvotes: 1