indexedDbCacheSettings function
IndexedDbCacheSettings
indexedDbCacheSettings({
- int sizeBytes = Settings.defaultCacheSizeBytes,
- bool indexAutoCreation = false,
- IndexBackfillSettings? indexBackfill,
- bool mergeUnsentWrites = false,
Settings for a cache in IndexedDB, in the format of the official Firebase JS SDK (see IndexedDbCacheSettings).
sizeBytes is an approximate cache size threshold, as in PersistentCacheSettings.sizeBytes: the size is the one
the JS SDK counts (the JSON length of the cached documents). Use Settings.cacheSizeUnlimited to disable the
collection; the minimum is 1 MB, an ArgumentError is thrown otherwise. indexAutoCreation, indexBackfill and
mergeUnsentWrites are those of PersistentCacheSettings.
Throws an UnsupportedError on other platforms than the web.
Implementation
IndexedDbCacheSettings indexedDbCacheSettings({
int sizeBytes = Settings.defaultCacheSizeBytes,
bool indexAutoCreation = false,
IndexBackfillSettings? indexBackfill,
bool mergeUnsentWrites = false,
}) => IndexedDbCacheSettingsInternal.create(
createIndexedDbPersistence,
sizeBytes: sizeBytes,
indexAutoCreation: indexAutoCreation,
indexBackfill: indexBackfill,
mergeUnsentWrites: mergeUnsentWrites,
);