class JbuilderTemplate
def cache!(key=nil, options={})
json.extract! @person, :name, :age
json.cache! ['v1', @person], expires_in: 10.minutes do
Example:
method in `ActionView::Helpers::CacheHelper` and so can be used in the same way.
Caches the json constructed within the block passed. Has the same signature as the `cache` helper
def cache!(key=nil, options={}) if @context.controller.perform_caching value = _cache_fragment_for(key, options) do _scope { yield self } end merge! value else yield end end