MemoryCacheSettings

classMemoryCacheSettings :LocalCacheSettings


Configures the SDK to use a memory cache. Firestore documents and mutations are NOT persisted across App restart.

To use, create an instance usingnewBuilder, then set the instance tosetLocalCacheSettings, and use the builtFirebaseFirestoreSettings instance to configure the Firestore SDK.

Summary

Nested types

A Builder for creatingMemoryCacheSettings instance.

Public functions

Boolean
equals(obj: Any?)
MemoryGarbageCollectorSettings

Returns theMemoryGarbageCollectorSettings object used to configure the SDK cache.

Int
java-staticMemoryCacheSettings.Builder

Returns a new instance ofMemoryCacheSettings.Builder with default configurations.

String!

Public functions

equals

fun equals(obj: Any?): Boolean

getGarbageCollectorSettings

fun getGarbageCollectorSettings(): MemoryGarbageCollectorSettings

Returns theMemoryGarbageCollectorSettings object used to configure the SDK cache.

hashCode

fun hashCode(): Int

newBuilder

java-static fun newBuilder(): MemoryCacheSettings.Builder

Returns a new instance ofMemoryCacheSettings.Builder with default configurations.

toString

fun toString(): String!

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 2025-07-21 UTC.