⚡ 设置缓存过期时间.
This commit is contained in:
@@ -133,7 +133,7 @@ public class CommandSnippetServiceImpl implements CommandSnippetService {
|
||||
// 设置屏障 防止穿透
|
||||
CacheBarriers.checkBarrier(list, CommandSnippetCacheDTO::new);
|
||||
// 设置缓存
|
||||
RedisMaps.putAllJson(cacheKey, s -> s.getId().toString(), list);
|
||||
RedisMaps.putAllJson(cacheKey, CommandSnippetCacheKeyDefine.SNIPPET, s -> s.getId().toString(), list);
|
||||
}
|
||||
// 删除屏障
|
||||
CacheBarriers.removeBarrier(list);
|
||||
|
||||
@@ -132,7 +132,7 @@ public class PathBookmarkServiceImpl implements PathBookmarkService {
|
||||
// 设置屏障 防止穿透
|
||||
CacheBarriers.checkBarrier(list, PathBookmarkCacheDTO::new);
|
||||
// 设置缓存
|
||||
RedisMaps.putAllJson(cacheKey, s -> s.getId().toString(), list);
|
||||
RedisMaps.putAllJson(cacheKey, PathBookmarkCacheKeyDefine.PATH_BOOKMARK, s -> s.getId().toString(), list);
|
||||
}
|
||||
// 删除屏障
|
||||
CacheBarriers.removeBarrier(list);
|
||||
|
||||
Reference in New Issue
Block a user