update

open suspend fun update(id: Identifier, value: Value)(source)

Forces the cache to accept value as a more recent value for the given id than whatever it was previously storing.

All layers are updated.


abstract suspend fun update(values: Collection<Pair<Identifier, Value>>)(source)

Forces the cache to accept the given values as more recent for their associated identifier than whatever was previously stored.

If multiple values are provided for the same identifier, a cache implementation may either:

  • take only the last occurrence into account,

  • take each occurrence into account as subsequent updates, in the same order as they appear in the iterable.

If values is empty, this function does nothing.

All layers are updated.


open suspend fun update(vararg values: Pair<Identifier, Value>)(source)

Forces the cache to accept the given values as more recent for their associated identifier than whatever was previously stored.

This overload is provided for convenience, see update.