Cache.ValueWrapper
Constructor and Description |
---|
RedisCache(String name,
byte[] prefix,
RedisTemplate<? extends Object,? extends Object> template,
long expiration)
Constructs a new
RedisCache instance. |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
evict(Object key) |
Cache.ValueWrapper |
get(Object key) |
<T> T |
get(Object key,
Class<T> type)
Return the value to which this cache maps the specified key, generically specifying a type that return value will
be cast to.
|
String |
getName() |
Object |
getNativeCache()
This implementation simply returns the RedisTemplate used for configuring the cache, giving access to
the underlying Redis store.
|
void |
put(Object key,
Object value) |
Cache.ValueWrapper |
putIfAbsent(Object key,
Object value) |
public RedisCache(String name, byte[] prefix, RedisTemplate<? extends Object,? extends Object> template, long expiration)
RedisCache
instance.name
- cache nameprefix
- template
- expiration
- public Object getNativeCache()
getNativeCache
in interface Cache
public Cache.ValueWrapper get(Object key)
public <T> T get(Object key, Class<T> type)
public Cache.ValueWrapper putIfAbsent(Object key, Object value)