remove caches for html that contains no external requests (#5098)

This commit is contained in:
Molly Struve 2019-12-13 07:22:27 -06:00 committed by Ben Halpern
parent 4dca3f9b24
commit c8e712b6c8

View file

@ -14,22 +14,18 @@
</a>
</div>
<% end %>
<% cache "activity-profile-pic-#{json_data['user']['id']}-#{json_data['user']['profile_image_90']}" do %>
<a href="<%= json_data["user"]["path"] %>" class="small-pic-link-wrapper">
<div class="small-pic">
<img src="<%= json_data["user"]["profile_image_90"] %>" alt="link to <%= json_data["user"]["username"] %>'s profile">
</div>
</a>
<% end %>
<a href="<%= json_data["user"]["path"] %>" class="small-pic-link-wrapper">
<div class="small-pic">
<img src="<%= json_data["user"]["profile_image_90"] %>" alt="link to <%= json_data["user"]["username"] %>'s profile">
</div>
</a>
<div class="content notification-content article-content">
<% cache "activity-published-article-user-info-#{json_data['article']['id']}-#{json_data['article']['updated_at']}" do %>
<a href="<%= json_data["user"]["path"] %>">
<%= json_data["user"]["name"] %>
</a>
made a new post<%= ":" unless json_data["organization"] %>
<% if json_data["organization"] %>
under <a href="<%= json_data["organization"]["path"] %>"><%= json_data["organization"]["name"] %></a>:
<% end %>
<a href="<%= json_data["user"]["path"] %>">
<%= json_data["user"]["name"] %>
</a>
made a new post<%= ":" unless json_data["organization"] %>
<% if json_data["organization"] %>
under <a href="<%= json_data["organization"]["path"] %>"><%= json_data["organization"]["name"] %></a>:
<% end %>
<div>
@ -40,20 +36,18 @@
<% end %>
</div>
<% cache "activity-published-article-summary-#{json_data['article']['id']}-#{json_data['article']['updated_at']}" do %>
<a href="<%= json_data["article"]["path"] %>">
<div class="notification-new-post">
<div class="notification-new-post-title">
<%= h(json_data["article"]["title"]) %>
</div>
<div class="notification-new-post-tags">
<% json_data["article"]["cached_tag_list_array"].each do |tag| %>
#<%= tag %>
<% end %>
</div>
<a href="<%= json_data["article"]["path"] %>">
<div class="notification-new-post">
<div class="notification-new-post-title">
<%= h(json_data["article"]["title"]) %>
</div>
</a>
<% end %>
<div class="notification-new-post-tags">
<% json_data["article"]["cached_tag_list_array"].each do |tag| %>
#<%= tag %>
<% end %>
</div>
</div>
</a>
<% cache "activity-published-article-reactions-#{@last_user_reaction}-#{json_data['article']['updated_at']}-#{json_data['article']['id']}" do %>
<div class="comment-actions">