Skip to content

cmorss/association_cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Caches ActiveRecord associations using memcache

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages