CacheRegistry

Registry for managing named cache instances.

Types

Link copied to clipboard
object Companion

Factory for CacheRegistry.

Functions

Link copied to clipboard
suspend fun clearAll()

Clears all entries from all registered caches.

Link copied to clipboard
suspend fun <K, V> get(name: String): Cache<K, V>?

Gets an existing cache by name.

Link copied to clipboard
suspend fun getNames(): Set<String>

Returns the names of all registered caches.

Link copied to clipboard
suspend fun <K, V> getOrCreate(name: String, configure: CacheConfigBuilder.() -> Unit = {}): Cache<K, V>

Gets or creates a cache with the given name.

Link copied to clipboard
suspend fun remove(name: String): Cache<*, *>?

Removes a cache from the registry.