Modify sidebar cache (#1675)

This commit is contained in:
Ben Halpern 2019-01-29 11:52:44 -05:00 committed by GitHub
parent f5f206e40e
commit 043a21494c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@
<% end %>
<% end %>
<% else %>
<% cache("article-sticky-nav-articles-#{@article.id}-#{@article.updated_at}", :expires_in => 10.hours) do %>
<% cache("article-sticky-nav-articles-#{@article.id}-#{@article.updated_at}", :expires_in => 24.hours) do %>
<% @sticky_collection = StickyArticleCollection.new(@article, @organization || @user) %>
<% @sticky_articles = @sticky_collection.suggested_stickies %>
<% @user_stickies = @sticky_collection.user_stickies %>
@ -99,7 +99,7 @@
</div>
<% end %>
<% end %>
<% if user_signed_in? && @sticky_articles %>
<% if @sticky_articles %>
<% @sticky_articles.each_with_index do |article, index| %>
<div class="primary-sticky-nav-element-wrapper">
<% if index == 0 %>

View file

@ -222,7 +222,7 @@
</div>
</div>
<% cache("sticky-sidebar-#{@article.id}-#{(@organization || @user).updated_at}-#{user_signed_in?}", :expires_in => 18.hours) do %>
<% cache("sticky-sidebar-#{@article.id}-#{(@organization || @user).updated_at}-#{user_signed_in?}-#{@variant_number}", :expires_in => 24.hours) do %>
<%= render "articles/sticky_nav" %>
<% end %>