org.springframework.data.redis.cache
Class RedisCacheManager
java.lang.Object
org.springframework.data.redis.cache.RedisCacheManager
- All Implemented Interfaces:
- org.springframework.cache.CacheManager
public class RedisCacheManager
- extends Object
- implements org.springframework.cache.CacheManager
CacheManager implementation for Redis.
By default saves the keys by appending a prefix (which acts as a namespace). For performance reasons, the current implementation
uses a set for the keys in each cache.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedisCacheManager
public RedisCacheManager(RedisTemplate template)
getCache
public org.springframework.cache.Cache getCache(String name)
- Specified by:
getCache
in interface org.springframework.cache.CacheManager
getCacheNames
public Collection<String> getCacheNames()
- Specified by:
getCacheNames
in interface org.springframework.cache.CacheManager
setCachePrefix
public void setCachePrefix(RedisCachePrefix cachePrefix)
- Sets the cachePrefix.
- Parameters:
cachePrefix
- the cachePrefix to set