KacheController

constructor(cacheEnabled: () -> Boolean = { true }, cache: CacheClient, asyncWriteScope: CoroutineScope? = null, onAsyncWriteError: (Throwable) -> Unit = {})

Parameters

cacheEnabled

Called before every operation; when false the cache is bypassed.

cache

The CacheClient backend (Redis, in-memory, SQLite, etc.).

asyncWriteScope

If set, enables write-behind via setAsyncInternal/setAllAsyncInternal.

onAsyncWriteError

Optional handler for errors caught during async write execution.