Module: Cell::Caching::Notifications

Defined in:
lib/cell/caching.rb

Instance Method Summary collapse

Instance Method Details

#fetch_from_cache_for(key, options) ⇒ Object



80
81
82
83
84
85
86
87
88
# File 'lib/cell/caching.rb', line 80

def fetch_from_cache_for(key, options)
  ActiveSupport::Notifications.instrument("read_fragment.action_controller", :key => key) do
    cache_store.fetch(key, options) do
      ActiveSupport::Notifications.instrument("write_fragment.action_controller", :key => key) do
        yield
      end
    end
  end
end