load

fun load(key: K): Flow<V>(source)

Loads the value associated with the given key.

If the value is already cached, it is returned from the cache. Otherwise, the value is created using the createValue function, cached, and then returned.

Return

A Flow that emits the loaded value.

Parameters

key

The key for which to load the value.