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(β#{params[:id]}_save_meβ) do
blah = User.find_by_login(params[:id]) @items = Ass.timeline(
dj.id.to_s)
@items.some_cpu_heavy_command_and_database_heavy_command
end
end
==
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 %>