public Method

ActionCacheFilter.before(controller)

There's no documentation for this item.

Source Code

# File action_controller/caching/actions.rb, line 80
def before(controller)
  return unless @actions.include?(controller.action_name.intern)

  cache_path = ActionCachePath.new(controller, path_options_for(controller, @options))

  if cache = controller.read_fragment(cache_path.path)
    controller.rendered_action_cache = true
    set_content_type!(controller, cache_path.extension)
    controller.send!(:render_for_text, cache)
    false
  else
    controller.action_cache_path = cache_path
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.