summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--store/local_cache_supplier_reactions.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/local_cache_supplier_reactions.go b/store/local_cache_supplier_reactions.go
index 2bf6b82d2..dd588e7c4 100644
--- a/store/local_cache_supplier_reactions.go
+++ b/store/local_cache_supplier_reactions.go
@@ -23,7 +23,7 @@ func (s *LocalCacheSupplier) ReactionSave(ctx context.Context, reaction *model.R
}
func (s *LocalCacheSupplier) ReactionDelete(ctx context.Context, reaction *model.Reaction, hints ...LayeredStoreHint) *LayeredStoreSupplierResult {
- s.doInvalidateCacheCluster(s.reactionCache, reaction.PostId)
+ defer s.doInvalidateCacheCluster(s.reactionCache, reaction.PostId)
return s.Next().ReactionDelete(ctx, reaction, hints...)
}
@@ -42,7 +42,7 @@ func (s *LocalCacheSupplier) ReactionGetForPost(ctx context.Context, postId stri
func (s *LocalCacheSupplier) ReactionDeleteAllWithEmojiName(ctx context.Context, emojiName string, hints ...LayeredStoreHint) *LayeredStoreSupplierResult {
// This could be improved. Right now we just clear the whole
// cache because we don't have a way find what post Ids have this emoji name.
- s.doClearCacheCluster(s.reactionCache)
+ defer s.doClearCacheCluster(s.reactionCache)
return s.Next().ReactionDeleteAllWithEmojiName(ctx, emojiName, hints...)
}