From 875cfac406dbbbd95c008c949290019e44d7f7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 19 Mar 2019 20:06:21 +0100 Subject: [PATCH] Cache poll participants It looks like generating the poll takes sometime due to that method. --- app/models/poll/stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/poll/stats.rb b/app/models/poll/stats.rb index 62b53a15b..4191f0715 100644 --- a/app/models/poll/stats.rb +++ b/app/models/poll/stats.rb @@ -104,7 +104,7 @@ class Poll::Stats end stats_cache(*stats_methods) - stats_cache :voters, :recounts + stats_cache :participants, :voters, :recounts def stats_cache(key, &block) Rails.cache.fetch("polls_stats/#{poll.id}/#{key}/v12", &block)