修改缓存时间.

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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