Quantcast
Viewing all articles
Browse latest Browse all 8

Naming fragment cache (ActionController::Caching::Fragments)

One of the common ways of using fragment caching is to cache content that’s shared across the site (eg. left navigation, menus, widgets etc.) that looks and works the same regardless of the name of the action or controller calling it. In such cases it’s very easy to just use named fragment caching eg.:

<%cache('left_nav')do-%><%= display_left_nav -%><%end-%>

Viewing all articles
Browse latest Browse all 8

Trending Articles