writeWithCache

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)