15 filesupdated Jun 18, 2026
files9Download
./libJun 18, 2026./tasksJun 18, 2026./testJun 18, 2026init.rbJun 18, 2026install.rbJun 18, 2026MIT-LICENSEJun 18, 2026RakefileJun 18, 2026READMEJun 18, 2026uninstall.rbJun 18, 2026README
AssociationCache
Caches "some" active record associations.
For a belongs_to the object is looked up directly using the cache_key. If not found then a find() is done and the object is put in the cache and returned.
Collections are turned into queries just for the ids and then if the objects are in the cache they are returned and if not they are fetched and added to the cache.
Example
belongs_to :cow, :cached => true
has_many :chickens, :cached => true
has_and_belongs_to_many :farmers, :cached => true
Copyright (c) 2008 [Charlie Morss], released under the MIT license