From f53cf7cb0ccce6c5a472427f2769e8729157b646 Mon Sep 17 00:00:00 2001 From: Parker Date: Sun, 3 Jan 2021 23:01:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BC=93=E5=AD=98=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/opsli/core/cache/local/CacheUtil.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/cache/local/CacheUtil.java b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/cache/local/CacheUtil.java index 6e6a65f..d112aa1 100644 --- a/opsli-base-support/opsli-core/src/main/java/org/opsli/core/cache/local/CacheUtil.java +++ b/opsli-base-support/opsli-core/src/main/java/org/opsli/core/cache/local/CacheUtil.java @@ -975,8 +975,10 @@ public class CacheUtil { // 删除 EhCache 不论是什么 本地都按照热数据处理 ehCachePlugin.delete(CacheConstants.HOT_DATA,key+":"+field); // 删除 Redis - redisPlugin.hDelete(key, field); - ret = true; + Long hDeleteLong = redisPlugin.hDelete(key, field); + if(hDeleteLong != null && hDeleteLong > 0){ + ret = true; + } }catch (Exception e){ log.error(e.getMessage(),e); } @@ -1000,8 +1002,7 @@ public class CacheUtil { // 删除 EhCache 不论是什么 本地都按照热数据处理 ehCachePlugin.delete(CacheConstants.HOT_DATA,key); // 删除 Redis - redisPlugin.del(key); - ret = true; + ret = redisPlugin.del(key); }catch (Exception e){ log.error(e.getMessage(),e); } @@ -1039,9 +1040,8 @@ public class CacheUtil { public static boolean delNilFlag(String key) { boolean ret = false; try { - // 存入Redis - redisPlugin.del(NIL_FLAG_PREFIX + key); - ret = true; + // 删除Redis + ret = redisPlugin.del(NIL_FLAG_PREFIX + key); }catch (Exception e){ log.error(e.getMessage(),e); }