CacheMethod
class Model < ActiveRecord::Base def method #some long calculations end cache_method :method end m = Model.new m.method m.method # from cache m.calculate_method # aliased initial method m.update_method # aliased initial method m.reset_method # reset cache
Copyright © 2008 Ivan, released under the MIT license