mirror of https://gitee.com/stylefeng/roses
【8.3.3】【dict】【cache】字典缓存设置过期时间
parent
5259bd1a12
commit
ef50a1d0fb
|
@ -256,10 +256,10 @@ public class DictServiceImpl extends ServiceImpl<DictMapper, SysDict> implements
|
|||
|
||||
// 添加结果到缓存,然后再返回
|
||||
if (ObjectUtil.isEmpty(sysDict)) {
|
||||
this.dictNameMixedCache.put(cacheKey, StrUtil.EMPTY);
|
||||
this.dictNameMixedCache.put(cacheKey, StrUtil.EMPTY, DictConstants.DICT_DEFAULT_CACHE_TIMEOUT_SECONDS);
|
||||
return "";
|
||||
} else {
|
||||
this.dictNameMixedCache.put(cacheKey, sysDict.getDictName());
|
||||
this.dictNameMixedCache.put(cacheKey, sysDict.getDictName(), DictConstants.DICT_DEFAULT_CACHE_TIMEOUT_SECONDS);
|
||||
return sysDict.getDictName();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue