KCacheConfig

data class KCacheConfig(val maxAgeSeconds: Long = 300, val maxEntries: Int = 100, val strategy: KCacheStrategy = KCacheStrategy.NetworkFirst)(source)

Configuration for the in-memory HTTP response cache.

Only GET requests are cached. Cache keys include the URL and Vary-style headers (Authorization/X-Api-Key).

Internally backed by CircularBuffer (LRU key eviction) and KMap (reactive store), both from kindling-utils — no additional dependencies required.

Parameters

maxAgeSeconds

How long a cached response is considered fresh.

maxEntries

Maximum number of responses kept in memory. Oldest entries are evicted when the limit is reached.

strategy

Cache strategy. See KCacheStrategy.

Constructors

Link copied to clipboard
constructor(maxAgeSeconds: Long = 300, maxEntries: Int = 100, strategy: KCacheStrategy = KCacheStrategy.NetworkFirst)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard