trixnity-client
3.0.0-beta1
trixnity-client
/
net.folivo.trixnity.client.store.cache
/
StateFlowCache
/
writeWithCache
write
With
Cache
suspend
fun
writeWithCache
(
key
:
K
,
updater
:
suspend
(
oldValue
:
V
?
)
->
V
?
,
isContainedInCache
:
suspend
(
cacheValue
:
V
?
)
->
Boolean
,
retrieveAndUpdateCache
:
suspend
(
cacheValue
:
V
?
)
->
V
?
,
persist
:
suspend
(
newValue
:
V
?
)
->
Unit
)