indexeddb_cache library
The IndexedDB cache engine (web only): the cache in IndexedDB in the format of the official Firebase JS SDK, without SQLite. See IndexedDbCacheSettings.
A library of its own, so that only the apps that import it carry the engine's code:
import 'package:cloud_firestore_dart/cloud_firestore_dart.dart';
import 'package:cloud_firestore_dart/indexeddb_cache.dart';
final FirebaseFirestore firestore = FirebaseFirestore.instanceFor(
app: app,
settings: Settings(cacheSettings: indexedDbCacheSettings()),
);
Classes
- IndexBackfillSettings
- The rate at which the persistent cache indexes are filled in the background, see PersistentCacheSettings.indexBackfill.
- IndexedDbCacheSettings
-
Configures a cache stored in IndexedDB in the format of the official Firebase JS SDK, on the web, without SQLite
(no
sqlite3.wasmto download, noopenDatabasefunction).
Functions
-
indexedDbCacheSettings(
{int sizeBytes = Settings.defaultCacheSizeBytes, bool indexAutoCreation = false, IndexBackfillSettings? indexBackfill, bool mergeUnsentWrites = false}) → IndexedDbCacheSettings - Settings for a cache in IndexedDB, in the format of the official Firebase JS SDK (see IndexedDbCacheSettings).