cache key fix2

This commit is contained in:
Andreas Stephanides
2015-03-15 20:51:20 +01:00
parent 58f7fb8b27
commit 99a9ad6c07
5 changed files with 13 additions and 3 deletions

View File

@@ -36,7 +36,7 @@
<div class="span3">
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+params[:month].to_s+params[:year].to_s) do %>
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+"_"+params[:month].to_s+params[:year].to_s) do %>
<%= render 'calendars/calentries', :object=>@calentries %>
<% end %>

View File

@@ -47,7 +47,7 @@
</div>
<div class="span3">
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+params[:month].to_s+params[:year].to_s) do %>
<% cache("calendar_" + @calentries.map{|c| c.id}.join('') + @calentries.max{|c|c.updated_at.to_i}.updated_at.to_i.to_s+"_"+I18n.locale.to_s+params[:month].to_s+params[:year].to_s) do %>
<%= render 'calendars/calentries', :object=>@calentries %>
<% end %>