n8 / multi_fetch_fragments

Multi-fetch Fragments makes rendering and caching a collection of template partials easier and faster.
http://ninjasandrobots.com/rails-faster-partial-rendering-and-caching
MIT License
539 stars 63 forks source link

Using this gem with blocks #25

Closed bcackerman closed 11 years ago

bcackerman commented 11 years ago

I'm a bit confused with the documentation. Am I still able to use this gem with a cache block of code for example like this:

<% cache(['v1', @orders.count]) do %>
    <% if @orders.count < 1 %>
        <div class="row-fluid">
            ...
        </div>
    <% end %>
<% end %>
n8 commented 11 years ago

The gem is just for rendering out a collection of partials using render :partial. So yes you should be able to still use a cache block like this without this gem interfering.