Skip to content

Instantly share code, notes, and snippets.

@genki
Created February 21, 2009 11:42
Show Gist options
  • Save genki/68016 to your computer and use it in GitHub Desktop.
Save genki/68016 to your computer and use it in GitHub Desktop.
def eager_cache(action, conditions = {}, params = request.params.dup, env = request.env.dup, &blk)
unless @_skip_cache
if action.is_a?(Array)
klass, action = *action
else
klass = self.class
end
run_later do
controller = klass.eager_dispatch(action, params.dup, env.dup, blk)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment