Skip to content

Instantly share code, notes, and snippets.

@mpearce
Created August 25, 2010 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpearce/549165 to your computer and use it in GitHub Desktop.
Save mpearce/549165 to your computer and use it in GitHub Desktop.
## How to warm caches_page with delayed_job (or any other async worker)
## Why build it on the fly, when you can build it in advance.
def perform
require 'action_controller/integration'
app = ActionController::Integration::Session.new
app.host! thing_host # for a system with subdomains
app.get thing_path
app.get next_thing_path
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment