Showing
2 changed files
with
3 additions
and
15 deletions
@@ -221,19 +221,6 @@ public class RedisHashCache { | @@ -221,19 +221,6 @@ public class RedisHashCache { | ||
221 | } | 221 | } |
222 | } | 222 | } |
223 | 223 | ||
224 | - /** | ||
225 | - * 判断值是否存在 | ||
226 | - * @param cacheKey | ||
227 | - * @return | ||
228 | - */ | ||
229 | - public Boolean hasKey(String cacheKey) { | ||
230 | - logger.debug("Enter hasKey hashOperation redis. cacheKey is {}", cacheKey); | ||
231 | - try { | ||
232 | - return yHRedisTemplate.hasKey(cacheKey); | ||
233 | - } catch (Exception e) { | ||
234 | - logger.warn("get haskey method fail!! e {}", e); | ||
235 | - } | ||
236 | - return false; | ||
237 | - } | 224 | + |
238 | 225 | ||
239 | } | 226 | } |
@@ -47,7 +47,8 @@ public class RedisTemplate { | @@ -47,7 +47,8 @@ public class RedisTemplate { | ||
47 | * @return | 47 | * @return |
48 | */ | 48 | */ |
49 | public void delete(String key) { | 49 | public void delete(String key) { |
50 | - yHRedisTemplate.delete(key); | 50 | + RedisKeyBuilder redisKeyBuilder = RedisKeyBuilder.newInstance().appendFixed(key); |
51 | + yHRedisTemplate.delete(redisKeyBuilder); | ||
51 | } | 52 | } |
52 | 53 | ||
53 | 54 |
-
Please register or login to post a comment