MCPcopy Create free account
hub / github.com/diyhi/bbs / CommentCacheManager

Class CommentCacheManager

src/main/java/cms/component/topic/CommentCacheManager.java:14–51  ·  view source on GitHub ↗

评论缓存管理

Source from the content-addressed store, hash-verified

12 * 评论缓存管理
13 */
14@Component("commentCacheManager")
15public class CommentCacheManager {
16 @Resource CommentRepository commentRepository;
17
18
19 /**
20 * 查询评论缓存
21 * @param commentId 评论Id
22 */
23 @Cacheable(value="commentCacheManager_cache_findByCommentId",key="#commentId")
24 public Comment query_cache_findByCommentId(Long commentId){
25 return commentRepository.findByCommentId(commentId);
26 }
27 /**
28 * 删除评论缓存
29 * @param commentId 评论Id
30 */
31 @CacheEvict(value="commentCacheManager_cache_findByCommentId",key="#commentId")
32 public void delete_cache_findByCommentId(Long commentId){
33
34 }
35
36 /**
37 * 查询回复缓存
38 * @param replyId 回复Id
39 */
40 @Cacheable(value="commentCacheManager_cache_findReplyByReplyId",key="#replyId")
41 public Reply query_cache_findReplyByReplyId(Long replyId){
42 return commentRepository.findReplyByReplyId(replyId);
43 }
44 /**
45 * 删除回复缓存
46 * @param replyId 回复Id
47 */
48 @CacheEvict(value="commentCacheManager_cache_findReplyByReplyId",key="#replyId")
49 public void delete_cache_findReplyByReplyId(Long replyId){
50 }
51}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…