MemoryLruGcSettings.Builder

class MemoryLruGcSettings.Builder


Summary

Public functions

MemoryLruGcSettings
MemoryLruGcSettings.Builder

Sets an approximate cache size threshold for the memory cache.

Public functions

build

fun build(): MemoryLruGcSettings

setSizeBytes

fun setSizeBytes(size: Long): MemoryLruGcSettings.Builder

Sets an approximate cache size threshold for the memory cache. If the cache grows beyond this size, Firestore SDK 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.

A default size of 100MB (100 * 1024 * 1024) is used if unset. The minimum value to set is 1 MB (1024 * 1024).

Returns
MemoryLruGcSettings.Builder

this Builder instance.