Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2.0.3) is shown here.
cache_erb_fragment(block, name = {}, options = nil)
public
Called by CacheHelper#cache
# File actionpack/lib/action_controller/caching.rb, line 375
def cache_erb_fragment(block, name = {}, options = nil)
unless perform_caching then block.call; return end
buffer = eval(ActionView::Base.erb_variable, block.binding)
if cache = read_fragment(name, options)
buffer.concat(cache)
else
pos = buffer.length
block.call
write_fragment(name, buffer[pos..-1], options)
end
end