Fix post cache keys to include pagination

This commit is contained in:
Tim
2025-09-17 11:52:42 +08:00
parent 6f968d16aa
commit 063866cc3a
2 changed files with 13 additions and 13 deletions

View File

@@ -52,7 +52,7 @@ public class CommentService {
@CacheEvict(
value = CachingConfig.POST_CACHE_NAME,
key = "'latest_reply'"
allEntries = true
)
@Transactional
public Comment addComment(String username, Long postId, String content) {
@@ -104,7 +104,7 @@ public class CommentService {
@CacheEvict(
value = CachingConfig.POST_CACHE_NAME,
key = "'latest_reply'"
allEntries = true
)
@Transactional
public Comment addReply(String username, Long parentId, String content) {
@@ -241,7 +241,7 @@ public class CommentService {
@CacheEvict(
value = CachingConfig.POST_CACHE_NAME,
key = "'latest_reply'"
allEntries = true
)
@Transactional
public void deleteComment(String username, Long id) {
@@ -260,7 +260,7 @@ public class CommentService {
@CacheEvict(
value = CachingConfig.POST_CACHE_NAME,
key = "'latest_reply'"
allEntries = true
)
@Transactional
public void deleteCommentCascade(Comment comment) {