Method: Comfy::Cms::WithFragments#content_cache

Defined in:
app/models/concerns/comfy/cms/with_fragments.rb

#content_cacheObject

If content_cache column is populated we don’t need to call render for this page.



94
95
96
97
98
99
100
# File 'app/models/concerns/comfy/cms/with_fragments.rb', line 94

def content_cache
  if (cache = read_attribute(:content_cache)).nil?
    cache = render
    update_column(:content_cache, cache) unless new_record?
  end
  cache
end