CacheSettings
class CacheSettings
The local caching settings used by a FirebaseDataConnect object, as specified in its DataConnectSettings.
Summary
Nested types |
|---|
enum CacheSettings.Storage : EnumThe types of cache storage supported by |
Public constructors |
|---|
CacheSettings(storage: CacheSettings.Storage, maxAge: Duration) |
Public functions |
|
|---|---|
open operator Boolean |
Compares this object with another object for equality. |
open Int |
hashCode()Calculates and returns the hash code for this object. |
open String |
toString()Returns a string representation of this object, useful for debugging. |
Public properties |
|
|---|---|
Duration |
The maximum age of cached query results to use before considering them to be "stale". |
CacheSettings.Storage |
The type of storage to use to store the cache data. |
Extension functions |
|
|---|---|
CacheSettings |
CacheSettings.copy(storage: CacheSettings.Storage, maxAge: Duration)Creates and returns a new |
Public constructors
CacheSettings
CacheSettings(
storage: CacheSettings.Storage = Storage.PERSISTENT,
maxAge: Duration = Duration.ZERO
)
| Parameters | |
|---|---|
storage: CacheSettings.Storage = Storage.PERSISTENT |
The value to set for the |
maxAge: Duration = Duration.ZERO |
The maximum age of cached query results to use before considering them to be "stale". |
Public functions
equals
open operator fun equals(other: Any?): Boolean
Compares this object with another object for equality.
| Parameters | |
|---|---|
other: Any? |
The object to compare to this for equality. |
| Returns | |
|---|---|
Boolean |
true if, and only if, the other object is an instance of |
hashCode
open fun hashCode(): Int
Calculates and returns the hash code for this object.
The hash code is not guaranteed to be stable across application restarts.
| Returns | |
|---|---|
Int |
the hash code for this object, that incorporates the values of this object's public properties. |
toString
open fun toString(): String
Returns a string representation of this object, useful for debugging.
The string representation is not guaranteed to be stable and may change without notice at any time. Therefore, the only recommended usage of the returned string is debugging and/or logging. Namely, parsing the returned string or storing the returned string in non-volatile storage should generally be avoided in order to be robust in case that the string representation changes.
| Returns | |
|---|---|
String |
a string representation of this object, which includes the class name and the values of all public properties. |
Public properties
Extension functions
copy
fun CacheSettings.copy(
storage: CacheSettings.Storage = this.storage,
maxAge: Duration = this.maxAge
): CacheSettings
Creates and returns a new CacheSettings object with the given property values.