【8.3.3】【dict】【cache】字典缓存设置过期时间

pull/62/head
stylefeng 2025-01-14 16:34:13 +08:00
parent 5259bd1a12
commit ef50a1d0fb
1 changed files with 2 additions and 2 deletions

View File

@ -256,10 +256,10 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, SysDict> implements
// 添加结果到缓存,然后再返回 // 添加结果到缓存,然后再返回
if (ObjectUtil.isEmpty(sysDict)) { if (ObjectUtil.isEmpty(sysDict)) {
this.dictNameMixedCache.put(cacheKey, StrUtil.EMPTY); this.dictNameMixedCache.put(cacheKey, StrUtil.EMPTY, DictConstants.DICT_DEFAULT_CACHE_TIMEOUT_SECONDS);
return ""; return "";
} else { } else {
this.dictNameMixedCache.put(cacheKey, sysDict.getDictName()); this.dictNameMixedCache.put(cacheKey, sysDict.getDictName(), DictConstants.DICT_DEFAULT_CACHE_TIMEOUT_SECONDS);
return sysDict.getDictName(); return sysDict.getDictName();
} }
} }