|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectplay.cache.Cache
public class Cache
Provides an access point for Play's cache service.
| Constructor Summary | |
|---|---|
Cache()
|
|
| Method Summary | ||
|---|---|---|
static java.lang.Object |
get(java.lang.String key)
Retrieves an object by key. |
|
static
|
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. |
|
static void |
set(java.lang.String key,
java.lang.Object value)
Sets a value without expiration. |
|
static void |
set(java.lang.String key,
java.lang.Object value,
int expiration)
Sets a value with expiration. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Cache()
| Method Detail |
|---|
public static java.lang.Object get(java.lang.String key)
public static <T> T getOrElse(java.lang.String key,
java.util.concurrent.Callable<T> block,
int expiration)
throws java.lang.Exception
key - Item key.value - to set if key does not existexpiration - expiration period in seconds.
java.lang.Exception
public static void set(java.lang.String key,
java.lang.Object value,
int expiration)
expiration - expiration in seconds
public static void set(java.lang.String key,
java.lang.Object value)
expiration - expiration in seconds
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||