CacheConfig

data class CacheConfig(val maxSize: Int = 100, val ttl: Duration? = 5.minutes, val evictionStrategy: EvictionStrategy = EvictionStrategy.LRU)(source)

Configuration for cache behavior.

Constructors

Link copied to clipboard
constructor(maxSize: Int = 100, ttl: Duration? = 5.minutes, evictionStrategy: EvictionStrategy = EvictionStrategy.LRU)

Properties

Link copied to clipboard

Strategy used to evict entries when the cache is full.

Link copied to clipboard

Maximum number of entries the cache can hold.

Link copied to clipboard

Time-to-live for cache entries, or null for no expiration.