Forum: Ruby on Rails Globally keyed cache fragments across all controllers

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jake B. (Guest)
on 2012-08-02 09:11
In the documentation for fragment caching
this is stated:

  If you don’t want the cache block to bind to the action that called
it, You can also use globally keyed fragments by calling the cache
method with a key, like so:

  <% cache('all_available_products') do %>
    All available products:
  <% end %>

  This fragment is then available to all actions in the
ProductsController [...]

Is it possible to add a globally keyed cache fragment that is available
in _all_ controllers, not just ProductsController as in the example
above? I plan on having a list of the top 10 items of one of my models,
in my layout, so it'd be ideal to have that cached globally.
This topic is locked and can not be replied to.