-
- All Implemented Interfaces:
public interface CacheTransaction<V extends Object>An atomic transaction run on a cache for objects of type V.
-
-
Method Summary
Modifier and Type Method Description abstract Vget(String key)Gets the current cached value for the given key. abstract Unitput(String key, V value)Writes the cached value for the given key. <V extends Any> VgetOrPut(CacheTransaction<V> $self, String key, SuspendFunction0<V> defaultValue)Gets the current cached value for the given key or creates and caches a new one. abstract Vremove(String key)Clears the cached value for the given key. abstract Unitclear()Clears all cached values. -
-
Method Detail
-
getOrPut
<V extends Any> V getOrPut(CacheTransaction<V> $self, String key, SuspendFunction0<V> defaultValue)
Gets the current cached value for the given key or creates and caches a new one.
-
-
-
-