From 7c47d351f0b74dd20da3d1a0c90f264b33b2b195 Mon Sep 17 00:00:00 2001 From: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com> Date: Thu, 21 Jan 2021 17:03:42 -0500 Subject: [PATCH] Cache only the static badge achievement data for notifications (#12368) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Cache only the static badge achievement data for notifications * Cache the image too, but at what cost...? 🤔 * Add data update script to clear badge achievement notifications' caches * Remove unnecessary cache for badge achievement notifications --- app/views/notifications/_badgeachievement.html.erb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/notifications/_badgeachievement.html.erb b/app/views/notifications/_badgeachievement.html.erb index 786f00cc1..1bc2c7f47 100644 --- a/app/views/notifications/_badgeachievement.html.erb +++ b/app/views/notifications/_badgeachievement.html.erb @@ -1,6 +1,5 @@ <% json_data = notification.json_data %>
- <% cache "activity-badge-reward-#{json_data['badge_achievement']['badge_id']}" do %>

You received the <%= sanitize(json_data["badge_achievement"]["badge"]["title"]) %> badge @@ -12,7 +11,6 @@ " alt="<%= json_data["badge_achievement"]["badge"]["title"] %>">

<%= json_data["badge_achievement"]["rewarding_context_message"].html_safe %>

- <% end %>

" class="crayons-btn w-100 m:w-50">Visit your profile

You also get 5 new credits to use for community listings if you have anything you'd like to promote. 🎉