设置缓存过期时间.

This commit is contained in:
lijiahang
2024-04-26 16:37:47 +08:00
parent 2b8d64da45
commit f420315d3e
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);