CachedLoader

abstract class CachedLoader<K, V>(source)

A generic class for loading and caching values.

This class provides a mechanism to load values associated with keys and cache them for future use. It uses a HashMap to store the cached values.

Parameters

K

The type of the keys used for caching.

V

The type of the values being cached.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun clear()
fun clear(key: K)
Link copied to clipboard
fun load(key: K): Flow<V>

Loads the value associated with the given key.