create

suspend fun <K, V> create(config: CacheConfig = CacheConfig(), clock: Clock = Clock.System): Cache<K, V>(source)

Creates a new Cache instance.

Return

a new Cache instance

Parameters

config

Configuration for cache behavior

clock

Clock used for TTL calculations