Shit Can

A teeny-tiny wrapper for the memcached gem that makes partial caching so easy a monkey could do it

Some method somewhere

==


def some_controller_action
  ShitCan.skip_if_exists(
==

Some view somewhere


<% ShitCan.get_or_set "#{params[:id]}_save_me" do %>
  <% @items.each do |item| %>
    <li class="activity_feed_<%= item[1]['type'] %> clear">
      <div class="feed_item_body">
        <%= item.some.heavy.associations.lookup %>
      </div>
    </li>
  <% end %>
<% end %>