CacheStore
class CacheStore
Caches data.
Types
Link copied to clipboard
class KeyNamespace
Identifies a key namespace. These namespaces help prevent interscope key collisions.
Functions
Link copied to clipboard
fun <T : Any> getOrSet(keyNamespace: CacheStore.KeyNamespace, vararg keyComponents: Any?, value: () -> T): T
Retrieves the value associated with the key belonging to the specified namespace and matching the given components. If there’s no such value, value is called, and its result is cached and returned.
Link copied to clipboard
Removes all values that were added before the last call to this function and haven’t been read since the last call. When called for the first time on a given CacheStore, this function doesn’t remove any values.