update

suspend fun update(id0: ID0, id1: ID1, block: (ID1, V?) -> V?)

Updates the entry for the given id0 and id1 using block.

  • If block returns null, the entry is removed.

  • If the new value is equal to the old one, no update is made.

  • Otherwise, the new value is stored with an updated timestamp.

Parameters

id0

the outer key

id1

the inner key

block

a function receiving the inner key and current value, returning the new value (or null to remove it)