remove

suspend fun remove(cacheKey: CacheKey, cascade: Boolean = true): Boolean

Removes a record by its key.

Call publish with ALL_KEYS to notify any watchers.

Return

true if the record was successfully removed, false otherwise

Parameters

cacheKey

the key of the record to remove

cascade

whether referenced records should also be removed

See also


suspend fun remove(cacheKeys: List<CacheKey>, cascade: Boolean = true): Int

Removes a list of records by their keys. This is an optimized version of remove for caches that can batch operations.

Call publish with ALL_KEYS to notify any watchers.

Return

the number of records that have been removed

Parameters

cacheKeys

the keys of the records to remove

cascade

whether referenced records should also be removed

See also