Module: RailsPulse::CachedComponentHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/rails_pulse/cached_component_helper.rb
Instance Method Summary collapse
Instance Method Details
#cached_component(options) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/rails_pulse/cached_component_helper.rb', line 3 def cached_component() # cache_key = ComponentCacheKey.build(options[:id], options[:context]) # Add refresh action for panels if requested if [:refresh_action] && [:component] == "panel" [:actions] ||= [] [:actions] << refresh_action_params([:id], [:context], [:content_partial]) end # if Rails.cache.exist?(cache_key) if false render_cached_content() else render_skeleton_with_frame() end end |