persistenceEnabled property

bool persistenceEnabled
final

Enables or disables local persistent storage. The default is to use local persistent storage.

The cache is only persistent when FirebaseFirestore.instanceFor also gets an openDatabase function; without one the cache is in memory even when this is true.

When cacheSettings is set this is derived from it: true for PersistentCacheSettings, IndexedDbCacheSettings and KeyValueCacheSettings, false for MemoryCacheSettings.

Implementation

final bool persistenceEnabled;