CacheSettings.Storage

enum CacheSettings.Storage : Enum


The types of cache storage supported by FirebaseDataConnect in its CacheSettings setting.

Summary

Enum Values

MEMORY

Cached data is stored ephemerally in memory.

PERSISTENT

Cached data is stored persistently on the device's local file system.

Public functions

CacheSettings.Storage
valueOf(value: String)

Returns the enum constant of this type with the specified name.

Array<CacheSettings.Storage>

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

MEMORY

val CacheSettings.Storage.MEMORYCacheSettings.Storage

Cached data is stored ephemerally in memory.

This storage is extremely fast, but the data is lost entirely when the application process terminates. It is isolated to the current process and cannot be shared. Note that this cache consumes RAM while the process is running.

PERSISTENT

val CacheSettings.Storage.PERSISTENTCacheSettings.Storage

Cached data is stored persistently on the device's local file system.

This storage ensures data is retained across application restarts and device reboots. Because the data is persisted to disk, it may be accessed by multiple processes within the same application. Note that the data is stored in a directory that will be picked up by Android's Auto Backup feature.

Public functions

valueOf

fun valueOf(value: String): CacheSettings.Storage

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException: kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

fun values(): Array<CacheSettings.Storage>

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.