From c8e473a789aee912d57c0d42b32fbbbfb3b4228a Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 30 Aug 2018 10:28:58 -0400 Subject: Invalidate store cache after making changes (#9211) * Invalidate store cache after making changes * Address feedback * Make cache invalidation in stores always use defer --- store/local_cache_supplier_reactions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'store/local_cache_supplier_reactions.go') 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...) } -- cgit v1.2.3-1-g7c22