Use snappy to compress fragment caches before storage
Add this line to your application's Gemfile:
gem 'snappy_fragments'
And then execute:
$ bundle
Or install it yourself as:
$ gem install snappy_fragments
In your view
<%= snappy_fragment "cache_key_of_your_choice", :expires_in => 24.hours do %>
<!-- large fragment with heavy computation -->
<% end %>
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request