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

979c3d4bf493789000abe2eba635a4a4?d=identicon&s=25 Jake Blake (jblake)
on 2012-08-02 07: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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.