In the documentation for fragment caching
(http://guides.rubyonrails.org/caching_with_rails.html#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.