voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
26 lines (17 loc) • 3.09 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [Settings](./firestore_.settings.md)
## Settings interface
Specifies custom configurations for your Cloud Firestore instance. You must set these before invoking any other methods.
<b>Signature:</b>
```typescript
export declare interface Settings
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [cacheSizeBytes?](./firestore_.settings.cachesizebytes.md) | number | <i>(Optional)</i> 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 size is not a 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 <code>CACHE_SIZE_UNLIMITED</code> to disable garbage collection. |
| [experimentalAutoDetectLongPolling?](./firestore_.settings.experimentalautodetectlongpolling.md) | boolean | <i>(Optional)</i> Configures the SDK's underlying transport (WebChannel) to automatically detect if long-polling should be used. This is very similar to <code>experimentalForceLongPolling</code>, but only uses long-polling if required.<!-- -->This setting will likely be enabled by default in future releases and cannot be combined with <code>experimentalForceLongPolling</code>. |
| [experimentalForceLongPolling?](./firestore_.settings.experimentalforcelongpolling.md) | boolean | <i>(Optional)</i> Forces the SDK’s underlying network transport (WebChannel) to use long-polling. Each response from the backend will be closed immediately after the backend sends data (by default responses are kept open in case the backend has more data to send). This avoids incompatibility issues with certain proxies, antivirus software, etc. that incorrectly buffer traffic indefinitely. Use of this option will cause some performance degradation though.<!-- -->This setting cannot be used with <code>experimentalAutoDetectLongPolling</code> and may be removed in a future release. If you find yourself using it to work around a specific network reliability issue, please tell us about it in https://github.com/firebase/firebase-js-sdk/issues/1674. |
| [host?](./firestore_.settings.host.md) | string | <i>(Optional)</i> The hostname to connect to. |
| [ignoreUndefinedProperties?](./firestore_.settings.ignoreundefinedproperties.md) | boolean | <i>(Optional)</i> Whether to skip nested properties that are set to <code>undefined</code> during object serialization. If set to <code>true</code>, these properties are skipped and not written to Firestore. If set to <code>false</code> or omitted, the SDK throws an exception when it encounters properties of type <code>undefined</code>. |
| [ssl?](./firestore_.settings.ssl.md) | boolean | <i>(Optional)</i> Whether to use SSL when connecting. |