From facc73f23facdb7e74f66159bb4a58faafbc91cf Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 1 Dec 2020 19:11:05 -0600 Subject: [PATCH] views: don't cache news updates. Don't fragment cache the site news banner. Caching this trades a SQL query for a Redis call, which is unlikely to make much performance difference to page rendering but puts high traffic volume on Redis. --- app/views/news_updates/_listing.html.erb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/app/views/news_updates/_listing.html.erb b/app/views/news_updates/_listing.html.erb index 8a3b3955f..1217d502d 100644 --- a/app/views/news_updates/_listing.html.erb +++ b/app/views/news_updates/_listing.html.erb @@ -1,13 +1,11 @@ -<% cache("news-updates", :expires_in => 1.hour) do %> - <% if NewsUpdate.recent.any? %> - <% end %>