write_fragment(key, content, options = nil)
public
Writes content to the location signified by key (see
expire_fragment
for acceptable formats)
# File actionpack/lib/action_controller/caching/fragments.rb, line 52
def write_fragment(key, content, options = nil)
return content unless cache_configured?
self.class.benchmark "Cached fragment miss: #{key}" do
key = fragment_cache_key(key)
content = content.html_safe.to_str if content.respond_to?(:html_safe)
cache_store.write(key, content, options)
end
content
end