修改缓存时间.

This commit is contained in:
lijiahang
2024-04-23 16:38:47 +08:00
parent c14c0248cb
commit f146989a1a
9 changed files with 19 additions and 18 deletions

View File

@@ -22,7 +22,7 @@ public interface CommandSnippetCacheKeyDefine {
.desc("命令片段列表 ${userId}") .desc("命令片段列表 ${userId}")
.type(CommandSnippetCacheDTO.class) .type(CommandSnippetCacheDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine SNIPPET_GROUP = new CacheKeyBuilder() CacheKeyDefine SNIPPET_GROUP = new CacheKeyBuilder()
@@ -30,7 +30,7 @@ public interface CommandSnippetCacheKeyDefine {
.desc("命令片段分组 ${userId}") .desc("命令片段分组 ${userId}")
.type(CommandSnippetGroupCacheDTO.class) .type(CommandSnippetGroupCacheDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -23,7 +23,7 @@ public interface HostCacheKeyDefine {
.desc("主机列表") .desc("主机列表")
.type(HostCacheDTO.class) .type(HostCacheDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine HOST_KEY = new CacheKeyBuilder() CacheKeyDefine HOST_KEY = new CacheKeyBuilder()
@@ -31,7 +31,7 @@ public interface HostCacheKeyDefine {
.desc("主机秘钥列表") .desc("主机秘钥列表")
.type(HostKeyCacheDTO.class) .type(HostKeyCacheDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine HOST_IDENTITY = new CacheKeyBuilder() CacheKeyDefine HOST_IDENTITY = new CacheKeyBuilder()
@@ -39,7 +39,7 @@ public interface HostCacheKeyDefine {
.desc("主机身份列表") .desc("主机身份列表")
.type(HostIdentityCacheDTO.class) .type(HostIdentityCacheDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -20,7 +20,7 @@ public interface DataExtraCacheKeyDefine {
.desc("数据拓展信息 ${userId} ${type} ${item}") .desc("数据拓展信息 ${userId} ${type} ${item}")
.type(String.class) .type(String.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -22,7 +22,7 @@ public interface DataGroupCacheKeyDefine {
.desc("数据分组列表结构 ${type} ${userId}") .desc("数据分组列表结构 ${type} ${userId}")
.type(DataGroupCacheDTO.class) .type(DataGroupCacheDTO.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine DATA_GROUP_TREE = new CacheKeyBuilder() CacheKeyDefine DATA_GROUP_TREE = new CacheKeyBuilder()
@@ -30,7 +30,7 @@ public interface DataGroupCacheKeyDefine {
.desc("数据分组树结构 ${type} ${userId}") .desc("数据分组树结构 ${type} ${userId}")
.type(DataGroupCacheDTO.class) .type(DataGroupCacheDTO.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine DATA_GROUP_REL_GROUP = new CacheKeyBuilder() CacheKeyDefine DATA_GROUP_REL_GROUP = new CacheKeyBuilder()
@@ -38,7 +38,7 @@ public interface DataGroupCacheKeyDefine {
.desc("数据分组数据关联-分组 ${groupId}") .desc("数据分组数据关联-分组 ${groupId}")
.type(Long.class) .type(Long.class)
.struct(RedisCacheStruct.LIST) .struct(RedisCacheStruct.LIST)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine DATA_GROUP_REL_TYPE = new CacheKeyBuilder() CacheKeyDefine DATA_GROUP_REL_TYPE = new CacheKeyBuilder()
@@ -46,7 +46,7 @@ public interface DataGroupCacheKeyDefine {
.desc("数据分组数据关联-类型 ${type} ${userId}") .desc("数据分组数据关联-类型 ${type} ${userId}")
.type(DataGroupRelCacheDTO.class) .type(DataGroupRelCacheDTO.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -20,7 +20,7 @@ public interface DataPermissionCacheKeyDefine {
.desc("用户所有数据权限 ${type} ${userId}") .desc("用户所有数据权限 ${type} ${userId}")
.type(Long.class) .type(Long.class)
.struct(RedisCacheStruct.LIST) .struct(RedisCacheStruct.LIST)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -22,7 +22,7 @@ public interface DictCacheKeyDefine {
.desc("字典配置项") .desc("字典配置项")
.type(DictKeyCacheDTO.class) .type(DictKeyCacheDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine DICT_SCHEMA = new CacheKeyBuilder() CacheKeyDefine DICT_SCHEMA = new CacheKeyBuilder()
@@ -30,7 +30,7 @@ public interface DictCacheKeyDefine {
.desc("字典配置项 schema ${key}") .desc("字典配置项 schema ${key}")
.type(JSONObject.class) .type(JSONObject.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine DICT_VALUE = new CacheKeyBuilder() CacheKeyDefine DICT_VALUE = new CacheKeyBuilder()
@@ -38,7 +38,7 @@ public interface DictCacheKeyDefine {
.desc("字典配置值 ${key}") .desc("字典配置值 ${key}")
.type(JSONObject.class) .type(JSONObject.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -20,7 +20,7 @@ public interface FavoriteCacheKeyDefine {
.desc("收藏信息 ${type} ${userId}") .desc("收藏信息 ${type} ${userId}")
.type(Long.class) .type(Long.class)
.struct(RedisCacheStruct.LIST) .struct(RedisCacheStruct.LIST)
.timeout(3, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -21,7 +21,7 @@ public interface PreferenceCacheKeyDefine {
.desc("用户偏好 ${userId} ${type}") .desc("用户偏好 ${userId} ${type}")
.type(Ref.class) .type(Ref.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
} }

View File

@@ -23,6 +23,7 @@ public interface UserCacheKeyDefine {
.desc("用户信息 ${id}") .desc("用户信息 ${id}")
.type(LoginUser.class) .type(LoginUser.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine USER_LIST = new CacheKeyBuilder() CacheKeyDefine USER_LIST = new CacheKeyBuilder()
@@ -30,7 +31,7 @@ public interface UserCacheKeyDefine {
.desc("用户列表") .desc("用户列表")
.type(UserInfoDTO.class) .type(UserInfoDTO.class)
.struct(RedisCacheStruct.HASH) .struct(RedisCacheStruct.HASH)
.timeout(1, TimeUnit.DAYS) .timeout(8, TimeUnit.HOURS)
.build(); .build();
CacheKeyDefine LOGIN_FAILED_COUNT = new CacheKeyBuilder() CacheKeyDefine LOGIN_FAILED_COUNT = new CacheKeyBuilder()
@@ -53,7 +54,7 @@ public interface UserCacheKeyDefine {
.desc("用户刷新 token ${id} ${time}") .desc("用户刷新 token ${id} ${time}")
.type(LoginTokenDTO.class) .type(LoginTokenDTO.class)
.struct(RedisCacheStruct.STRING) .struct(RedisCacheStruct.STRING)
.timeout(28, TimeUnit.HOURS) .timeout(32, TimeUnit.HOURS)
.build(); .build();
} }