RecordCache
RecordCache is a simple yet powerful extension to ActiveRecord that caches indexes and ActiveRecord models using MemCache. If you use it correctly, it will drastically reduce your database load.
Usage:
class Foo < ActiveRecord
record_cache :by => :id
record_cache :id, :by => :owner_id
end
# These will use the cache now.
Foo.find(1)
Foo.find_by_id(2)
Foo.find_all_by_owner_id(3)
Invalidation is handled for you using callbacks.
Install:
sudo gem install record_cache -s http://gemcutter.org
Dependencies:
License:
Copyright © 2009 Justin Balthrop, Geni.com; Published under The MIT License, see LICENSE