Skip to content

Instantly share code, notes, and snippets.

View john's full-sized avatar

John McGrath john

View GitHub Profile
@JangoSteve
JangoSteve / cache.rake
Created November 17, 2011 03:32
Automatically cache pages in Rails, put this in /lib/tasks/cache.rake
# See rails source:
# https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/caching/pages.rb
#
# Turn on caching in development, by changing this line to true in config/environments/development.rb:
#
# config.action_controller.perform_caching = true
#
# Then run:
#
# bundle exec rake pages:cache