Skip to content

Commit

Permalink
Revert "Cache more sidebar partials at the user instance"
Browse files Browse the repository at this point in the history
This reverts commit 90b1216.
  • Loading branch information
JoeCohen committed Jan 19, 2024
1 parent 7d90366 commit fb15058
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions app/views/controllers/application/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,16 @@ classes = {
<%= render(partial: "application/sidebar/login",
locals: { classes: classes }) %>
<% end %>
<% end %>
<%# Cache customized for the user instance because of Your Observations.%>
<% cache(@user) do %>
<% if @user %>
<%= render(partial: "application/sidebar/observations",
locals: { classes: classes }) %>
<% end %>
<% end %>
<%= render(partial: "application/sidebar/observations",
locals: { classes: classes }) %>
<%# Cache depends only on user status (logged-in? admin?) %>
<% cache([user_status_string]) do %>
<%= render(partial: "application/sidebar/latest",
locals: { classes: classes }) %>
<% end %>
<%# Cache customized for the user instance because of Your Lists.%>
<% cache(@user) do %>
<% if @user %>
<%= render(partial: "application/sidebar/species_lists",
locals: { classes: classes }) if @user %>
<% end %>
<% end %>
<%= render(partial: "application/sidebar/species_lists",
locals: { classes: classes }) if @user %>
<%# Cache depends only on user status (logged-in? admin?) %>
<% cache([user_status_string]) do %>
<%= render(partial: "application/sidebar/indexes",
locals: { classes: classes }) if @user %>
Expand Down

0 comments on commit fb15058

Please sign in to comment.