summaryrefslogtreecommitdiffstats
path: root/store/local_cache_supplier_reactions.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-08-30 10:28:58 -0400
committerGitHub <noreply@github.com>2018-08-30 10:28:58 -0400
commitc8e473a789aee912d57c0d42b32fbbbfb3b4228a (patch)
treed1700f1e897f08e7305e40d59b85f7a483e4a11a /store/local_cache_supplier_reactions.go
parent570c52b4cc88d7d0864511b9a4cb6318a07a6dbb (diff)
downloadchat-c8e473a789aee912d57c0d42b32fbbbfb3b4228a.tar.gz
chat-c8e473a789aee912d57c0d42b32fbbbfb3b4228a.tar.bz2
chat-c8e473a789aee912d57c0d42b32fbbbfb3b4228a.zip
Invalidate store cache after making changes (#9211)
* Invalidate store cache after making changes * Address feedback * Make cache invalidation in stores always use defer
Diffstat (limited to 'store/local_cache_supplier_reactions.go')
-rw-r--r--store/local_cache_supplier_reactions.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/store/local_cache_supplier_reactions.go b/store/local_cache_supplier_reactions.go
index be32ab77e..2bf6b82d2 100644
--- a/store/local_cache_supplier_reactions.go
+++ b/store/local_cache_supplier_reactions.go
@@ -18,7 +18,7 @@ func (s *LocalCacheSupplier) handleClusterInvalidateReaction(msg *model.ClusterM
}
func (s *LocalCacheSupplier) ReactionSave(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().ReactionSave(ctx, reaction, hints...)
}