Constructor and Description |
---|
DefaultCacheApi(play.api.cache.CacheApi cacheApi) |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(java.lang.String key)
Retrieves an object by key.
|
<T> T |
getOrElse(java.lang.String key,
java.util.concurrent.Callable<T> block)
Retrieve a value from the cache, or set it from a default Callable function.
|
<T> T |
getOrElse(java.lang.String key,
java.util.concurrent.Callable<T> block,
int expiration)
Retrieve a value from the cache, or set it from a default Callable function.
|
void |
remove(java.lang.String key)
Removes a value from the cache.
|
void |
set(java.lang.String key,
java.lang.Object value)
Sets a value without expiration.
|
void |
set(java.lang.String key,
java.lang.Object value,
int expiration)
Sets a value with expiration.
|
public <T> T get(java.lang.String key)
CacheApi
public <T> T getOrElse(java.lang.String key, java.util.concurrent.Callable<T> block, int expiration)
CacheApi
public <T> T getOrElse(java.lang.String key, java.util.concurrent.Callable<T> block)
CacheApi
public void set(java.lang.String key, java.lang.Object value, int expiration)
CacheApi
public void set(java.lang.String key, java.lang.Object value)
CacheApi