PersistentCacheSettings interface
Stay organized with collections
Save and categorize content based on your preferences.
An settings object to configure an PersistentLocalCache
instance.
Persistent cache cannot be used in a Node.js environment.
Signature:
export declare interface PersistentCacheSettings
Properties
Property |
Type |
Description |
cacheSizeBytes |
number |
An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The SDK does not guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to CACHE_SIZE_UNLIMITED to disable garbage collection. |
tabManager |
PersistentTabManager |
Specifies how multiple tabs/windows will be managed by the SDK. |
PersistentCacheSettings.cacheSizeBytes
An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The SDK does not guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.
The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to CACHE_SIZE_UNLIMITED
to disable garbage collection.
Signature:
cacheSizeBytes?: number;
PersistentCacheSettings.tabManager
Specifies how multiple tabs/windows will be managed by the SDK.
Signature:
tabManager?: PersistentTabManager;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-06-08 UTC.
[null,null,["Last updated 2023-06-08 UTC."],[],[],null,["# PersistentCacheSettings interface\n\nAn settings object to configure an `PersistentLocalCache` instance.\n\nPersistent cache cannot be used in a Node.js environment.\n\n**Signature:** \n\n export declare interface PersistentCacheSettings \n\nProperties\n----------\n\n| Property | Type | Description |\n|-------------------------------------------------------------------------------------------------|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [cacheSizeBytes](./firestore_.persistentcachesettings.md#persistentcachesettingscachesizebytes) | number | An approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The SDK does not guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to `CACHE_SIZE_UNLIMITED` to disable garbage collection. |\n| [tabManager](./firestore_.persistentcachesettings.md#persistentcachesettingstabmanager) | [PersistentTabManager](./firestore_.md#persistenttabmanager) | Specifies how multiple tabs/windows will be managed by the SDK. |\n\nPersistentCacheSettings.cacheSizeBytes\n--------------------------------------\n\nAn approximate cache size threshold for the on-disk data. If the cache grows beyond this size, Firestore will start removing data that hasn't been recently used. The SDK does not guarantee that the cache will stay below that size, only that if the cache exceeds the given size, cleanup will be attempted.\n\nThe default value is 40 MB. The threshold must be set to at least 1 MB, and can be set to `CACHE_SIZE_UNLIMITED` to disable garbage collection.\n\n**Signature:** \n\n cacheSizeBytes?: number;\n\nPersistentCacheSettings.tabManager\n----------------------------------\n\nSpecifies how multiple tabs/windows will be managed by the SDK.\n\n**Signature:** \n\n tabManager?: PersistentTabManager;"]]