Specifies custom configurations for your Cloud Firestore instance.You must set these before invoking any other methods.
Index
Properties
Optional cacheSizeBytes
An approximate cache size threshold for the on-disk data. If the cache grows beyond thissize, Firestore will start removing data that hasn't been recently used. The size is not aguarantee that the cache will stay below that size, only that if the cache exceeds the givensize, cleanup will be attempted.
The default value is 40 MB. The threshold must be set to at least 1 MB, and can be set toCACHE_SIZE_UNLIMITED to disable garbage collection.
Optional experimentalAutoDetectLongPolling
Configures the SDK's underlying transport (WebChannel) to automatically detect iflong-polling should be used. This is very similar toexperimentalForceLongPolling,but only uses long-polling if required.
This setting will likely be enabled by default in future releases and cannot becombined withexperimentalForceLongPolling.
This setting does not work in a Node.js environment.
Optional experimentalForceLongPolling
Forces the SDK’s underlying network transport (WebChannel) to uselong-polling. Each response from the backend will be closed immediatelyafter the backend sends data (by default responses are kept open incase the backend has more data to send). This avoids incompatibilityissues with certain proxies, antivirus software, etc. that incorrectlybuffer traffic indefinitely. Use of this option will cause someperformance degradation though.
This setting cannot be used withexperimentalAutoDetectLongPolling andmay be removed in a future release. If you find yourself using it towork around a specific network reliability issue, please tell us aboutit inhttps://github.com/firebase/firebase-js-sdk/issues/1674.
This setting does not work in a Node.js environment.
Optional host
The hostname to connect to.
Optional ignoreUndefinedProperties
Whether to skip nested properties that are set toundefined duringobject serialization. If set totrue, these properties are skippedand not written to Firestore. If set tofalse or omitted, the SDKthrows an exception when it encounters properties of typeundefined.
Optional merge
Whether to merge the provided settings with the existing settings. Ifset totrue, the settings are merged with existing settings. Ifset tofalse or left unset, the settings replace the existingsettings.
Optional ssl
Whether to use SSL when connecting.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-09-28 UTC.