cache

fun cache(config: CacheConfig.() -> Unit)

Configures an in-memory cache. Results are cached by key and TTL; cache is checked before executing the block.

Parameters

config

Lambda to configure CacheConfig (e.g. key, ttl, cleanupInterval).