From 7e259375e993d7c17b41e949d8a8668be0ada12f Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 3 Feb 2015 15:59:26 +1100 Subject: [PATCH] PERF: properly pass topic_id to post action cache to avoid excessive query in the past auto closing was forcing a consistency check on topic, which in turn was triggering a full post action cache rebuild --- app/models/topic_user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/topic_user.rb b/app/models/topic_user.rb index 9ca519085..3347695d5 100644 --- a/app/models/topic_user.rb +++ b/app/models/topic_user.rb @@ -280,7 +280,7 @@ SQL end def self.ensure_consistency!(topic_id=nil) - update_post_action_cache + update_post_action_cache(topic_id: topic_id) # TODO this needs some reworking, when we mark stuff skipped # we up these numbers so they are not in-sync