InMemoryResponseCache

class InMemoryResponseCache(maxEntries: Int, now: () -> Long = System::currentTimeMillis) : ResponseCache

A bounded, thread-safe, in-memory LRU cache with per-entry expiry.

Constructors

Link copied to clipboard
constructor(maxEntries: Int, now: () -> Long = System::currentTimeMillis)

Properties

Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
open suspend override fun get(key: String): String?
Link copied to clipboard
open suspend override fun put(key: String, body: String, ttl: Duration)