fix comment cache evict

main
wangqing 8 months ago
parent 1047824db2
commit 30e40640c2

@ -83,6 +83,9 @@ public class CommentController extends BaseController {
@Autowired
private PublicationLikeDao publicationLikeDao;
@Autowired
private RabbitTemplate rabbitTemplate;
@Autowired
private SensitiveWordBs sensitiveWordBs;
@ -410,7 +413,7 @@ public class CommentController extends BaseController {
cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_HOT+"_"+comment.getRootJournalId());
cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_NEW+"_"+comment.getRootJournalId());
cacheChannel.evict(Constants.J2CACHE_REGION_JOURNAL_HOT_COMMENTS,comment.getRootJournalId());
rabbitTemplate.convertAndSend(Constants.RABBIT_MESSAGE_CLEAN_JOURANL_QUERY_PAGE,comment.getRootJournalId());
if(StringUtils.isNotEmpty(comment.getParentId())) {
cacheChannel.clear(Constants.J2CACHE_REGION_JOURNAL_COMMENT_PAGE_CHILDREN+"_"+comment.getParentId());
}

Loading…
Cancel
Save