Method: AbstractController::Caching::Fragments#write_fragment
- Defined in:
- actionpack/lib/abstract_controller/caching/fragments.rb
#write_fragment(key, content, options = nil) ⇒ Object
Writes content to the location signified by key (see expire_fragment for acceptable formats).
80 81 82 83 84 85 86 87 88 89 |
# File 'actionpack/lib/abstract_controller/caching/fragments.rb', line 80 def write_fragment(key, content, = nil) return content unless cache_configured? key = combined_fragment_cache_key(key) instrument_fragment_cache :write_fragment, key do content = content.to_str cache_store.write(key, content, ) end content end |