Sha256: c2da45add5cd41f8c45b229be147ee3b5779d0430928785bc18ca8086d8257b8
Contents?: true
Size: 576 Bytes
Versions: 1
Compression:
Stored size: 576 Bytes
Contents
module Workarea module Storefront module FlowContentHelper def render_content_blocks(blocks) if current_user.try(:admin?) render_content_blocks_without_cache(blocks) else cache_key = [ flow_experience&.key, blocks.map(&:cache_key).join('/') ].compact.join('/') Rails.cache.fetch( cache_key, expires_in: Workarea.config.cache_expirations.render_content_blocks ) { render_content_blocks_without_cache(blocks) } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
workarea-flow_io-1.2.1 | app/helpers/workarea/storefront/flow_content_helper.rb |