Coroutine Cache
open class CoroutineCache<K, V, S : CoroutineCacheStore<K, V>>(name: String, store: S, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes)
Base class to create a coroutine and StateFlow based cache.
Parameters
name
The name is just used for logging.
cache Scope
A long living CoroutineScope to spawn coroutines, which remove entries from cache when not used anymore.
expire Duration
Duration to wait until entries from cache are when not used anymore.