summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-08-30 13:25:25 -0400
committerChristopher Speller <crspeller@gmail.com>2018-08-30 10:25:25 -0700
commit68fdaaa995555e93f067efc3a07f1866e43ae665 (patch)
treea4a3d816309c429b7573b0ead0691a1e7da104a6 /store
parentc8e473a789aee912d57c0d42b32fbbbfb3b4228a (diff)
downloadchat-68fdaaa995555e93f067efc3a07f1866e43ae665.tar.gz
chat-68fdaaa995555e93f067efc3a07f1866e43ae665.tar.bz2
chat-68fdaaa995555e93f067efc3a07f1866e43ae665.zip
Fix store cache invalidation for reactions (#9331)
Diffstat (limited to 'store')
-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...)
}