From 63701d10d7aaa541bb7a54245e4307f9bfee3d91 Mon Sep 17 00:00:00 2001 From: 31353 <31353751672@qq.com> Date: Sun, 21 Apr 2024 20:54:40 +0800 Subject: [PATCH] 4-21-1 --- src/main/java/com/guo/common/constant/CacheConstants.java | 5 +++++ src/main/java/com/guo/gateway/cache/NodeReduced.java | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/guo/common/constant/CacheConstants.java b/src/main/java/com/guo/common/constant/CacheConstants.java index 8d54cbf..b8074ae 100644 --- a/src/main/java/com/guo/common/constant/CacheConstants.java +++ b/src/main/java/com/guo/common/constant/CacheConstants.java @@ -46,4 +46,9 @@ public class CacheConstants { * 网关车辆对应网关节点ID */ public final static String GATEWAY_VEHICLE_LINE= "gateway:vehicleLine:"; + + /** + * 缩容缓存前缀 + */ + public final static String GATEWAY_REDUCED_CACHE= "reduced:cache:"; } diff --git a/src/main/java/com/guo/gateway/cache/NodeReduced.java b/src/main/java/com/guo/gateway/cache/NodeReduced.java index e7a162b..687da08 100644 --- a/src/main/java/com/guo/gateway/cache/NodeReduced.java +++ b/src/main/java/com/guo/gateway/cache/NodeReduced.java @@ -1,6 +1,7 @@ package com.guo.gateway.cache; import com.guo.common.constant.CacheConstants; +import com.guo.common.constant.LoadConstants; import com.guo.gateway.cache.abs.CacheAbs; import org.springframework.stereotype.Component; @@ -17,11 +18,9 @@ import java.util.concurrent.TimeUnit; @Component public class NodeReduced extends CacheAbs { - - @Override public String getPre() { - return "reduced:cache:"; + return CacheConstants.GATEWAY_REDUCED_CACHE; } /**