From a56e5f19ca0de06868fd1cfd0176625959cbbf51 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Mon, 28 Jan 2013 12:13:02 -0500 Subject: [PATCH] sync javadoc with impl on useprefix --- .../data/redis/cache/RedisCacheManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java b/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java index b5f7105bc..9753d5dff 100644 --- a/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java +++ b/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java @@ -28,8 +28,9 @@ import org.springframework.data.redis.core.RedisTemplate; /** * 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. + * 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. * * @author Costin Leau */ @@ -40,7 +41,7 @@ public class RedisCacheManager implements CacheManager { private final Collection names = Collections.unmodifiableSet(caches.keySet()); private final RedisTemplate template; - private boolean usePrefix; + private boolean usePrefix = false; private RedisCachePrefix cachePrefix = new DefaultRedisCachePrefix(); // 0 - never expire @@ -79,7 +80,7 @@ public class RedisCacheManager implements CacheManager { } /** - * Sets the cachePrefix. + * Sets the cachePrefix. Defaults to 'DefaultRedisCachePrefix'). * * @param cachePrefix the cachePrefix to set */