|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.data.redis.cache.RedisCacheManager
public class RedisCacheManager
CacheManager implementation for Redis. By default saves the keys directly, without appending a prefix (which acts as a namespace). To avoid clashes, it is recommended to change this (by setting 'usePrefix' to 'true'). For performance reasons, the current implementation uses a set for the keys in each cache.
| Constructor Summary | |
|---|---|
RedisCacheManager(RedisTemplate template)
|
|
| Method Summary | |
|---|---|
Cache |
getCache(String name)
|
Collection<String> |
getCacheNames()
|
void |
setCachePrefix(RedisCachePrefix cachePrefix)
Sets the cachePrefix. |
void |
setDefaultExpiration(long defaultExpireTime)
Sets the default expire time (in seconds). |
void |
setExpires(Map<String,Long> expires)
Sets the expire time (in seconds) for cache regions (by key). |
void |
setUsePrefix(boolean usePrefix)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RedisCacheManager(RedisTemplate template)
| Method Detail |
|---|
public Cache getCache(String name)
getCache in interface CacheManagerpublic Collection<String> getCacheNames()
getCacheNames in interface CacheManagerpublic void setUsePrefix(boolean usePrefix)
public void setCachePrefix(RedisCachePrefix cachePrefix)
cachePrefix - the cachePrefix to setpublic void setDefaultExpiration(long defaultExpireTime)
defaultExpireTime - time in seconds.public void setExpires(Map<String,Long> expires)
expires - time in seconds
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||