Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 489 Bytes

CacheBlock.markdown

File metadata and controls

8 lines (7 loc) · 489 Bytes
  • cache blocks are snippets of code in a layout that are always under cache. They start with:

  • these caching blocks are called fragment caches. You can check and see if they exist with the method fragment_exist?(action: 'nameOFAction')

  • also the below works only if there is one cache fragment per page. solved with: <% cache(:action => 'controllername', :part => 'nameofsection) do %>

  • {{ExpiringCachedFragments}}

    <% cache do %>
      <!-- Content -->
    <%end%>