<% cache(cache_key_for_reviews(@reviews)) do %>
  <% @reviews.each do |review| %>  
    <% cache(review) do %>
      <% if !review.user_id.nil? %>
        <div class="review_well">
          <p>
            <%= review.review %>
          </p>
          <p>
            Rating: <%= review.rating %>
          </p>
          <p>
            <%= render 'users/avatar', user: review.user %> - <span class="reviewer_quote"><%= review.user.first_name + ' ' + review.user.last_name%></span>
          </p>
          <span class = "timestamp">
            posted <%= time_ago_in_words(review.created_at) %> ago.
          </span>
          <% if can? :manage, review %>
            <%= link_to "Edit", edit_review_path(review) %> | 
            <%= link_to "Delete", review, method: :delete, data: { confirm: 'Are you sure?' } %>
          <% end %>
          <p>
            <%= link_to review_path(review) do %>
                <%= pluralize(review.comments.count, 'comment') %>
            <% end %>
          </p>
        </div>
      <% end %>    
    <% end %>
  <% end %>
<% end %>

<% cache(cache_key_for_reviews(@reviews)) do %>
  <% @reviews.each do |review| %>  
    <% if !review.user_id.nil? %>
      <div class="review_well">
        <% cache(review) do %>
          <p>
            <%= review.review %>
          </p>
          <p>
            Rating: <%= review.rating %>
          </p>
          <p>
            <%= render 'users/avatar', user: review.user %> - <span class="reviewer_quote"><%= review.user.first_name + ' ' + review.user.last_name%></span>
          </p>
          <span class = "timestamp">
            posted <%= time_ago_in_words(review.created_at) %> ago.
          </span>
          <p>
            <%= link_to review_path(review) do %>
                <%= pluralize(review.comments.count, 'comment') %>
            <% end %>
          </p>
        <% end %><!-- .cache -->
        <% if can? :manage, review %>
          <%= link_to "Edit", edit_review_path(review) %> | 
          <%= link_to "Delete", review, method: :delete, data: { confirm: 'Are you sure?' } %>
        <% end %>
      </div><!-- .well -->
    <% end %><!-- .user.id.nil? -->
  <% end %><!-- review.each -->
<% end %><!-- outer cache -->

Move permission-based links outside of inner-cache
Test: Move permission-based links outside of inner-cache
