소스 검색

[优化]缓存key增加token参数

release_toaliyun_real
bruce 6 년 전
committed by Stormeye Wu
부모
커밋
88de7a9a56
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +2
    -2
      mallinkBApi/src/main/java/com/iformall/aop/RedisCacheAspect.java
  2. +2
    -2
      mallinkCApi/src/main/java/com/iformall/aop/RedisCacheAspect.java

+ 2
- 2
mallinkBApi/src/main/java/com/iformall/aop/RedisCacheAspect.java 파일 보기

@@ -95,9 +95,9 @@ public class RedisCacheAspect {
// 接口路径 reqPath => /api/xxx
String reqPath = requestUrl.substring(requestUrl.indexOf("/api/"));
if (cache.md5()) {
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, HashUtil.md5(StringUtils.join(args, DELIMITER_PARAMS)));
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, HashUtil.md5(StringUtils.join(token,args, DELIMITER_PARAMS)));
} else {
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, StringUtils.join(args, DELIMITER_PARAMS));
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, StringUtils.join(token,args, DELIMITER_PARAMS));
}
} else {
redisKey = cache.key();


+ 2
- 2
mallinkCApi/src/main/java/com/iformall/aop/RedisCacheAspect.java 파일 보기

@@ -92,9 +92,9 @@ public class RedisCacheAspect {
// 接口路径 reqPath => /api/xxx
String reqPath = requestUrl.substring(requestUrl.indexOf("/api/"));
if (cache.md5()) {
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, HashUtil.md5(StringUtils.join(args, DELIMITER_PARAMS)));
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, HashUtil.md5(StringUtils.join(token,args, DELIMITER_PARAMS)));
} else {
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, StringUtils.join(args, DELIMITER_PARAMS));
redisKey = StringUtils.join(reqPath, DELIMITER_KEY, tenantId, DELIMITER_KEY, StringUtils.join(token,args, DELIMITER_PARAMS));
}
} else {
redisKey = cache.key();


불러오는 중...
취소
저장