insert

fun insert(url: String, response: String, retrievedAt: Instant = Clock.System.now(), lastModified: Instant?)

Inserts or updates a cached entry.

Parameters

url

The request URL used as the cache key.

response

The raw response body to store.

retrievedAt

The timestamp when the response was sent. Defaults to current system time.

lastModified

The timestamp associated with the response, if null the current system time is used.


fun insert(data: CacheData)

Inserts or updates a cached entry.

Parameters

data

The CacheData object to persist.