Skip to content

Instantly share code, notes, and snippets.

@joeljackson
Last active December 13, 2015 22:29
Show Gist options
  • Save joeljackson/4984428 to your computer and use it in GitHub Desktop.
Save joeljackson/4984428 to your computer and use it in GitHub Desktop.
Fragment Cacheing, Done Right
<% cache({:action_suffix => "game_card.#{I18n.locale}"}, :expires_in => 1.hour) do %>
<%= render :partial => 'game_card', :locals => { :game_product => @game.product } %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment