MonoForge

grantr / cached_associations

cached_associations

Public

automatically cache ActiveRecord associations

13 filesupdated Jun 18, 2026

README

Automatically cache ActiveRecord associations in memcached.

class User < ActiveRecord::Base acts_as_cached belongs_to_cached :group end

class Group < ActiveRecord::Base acts_as_cached end

Instead of caching the association objects and writing expiration sweepers, we cache the association ids and load the objects from memcached by id.

cache_fu is required (for now)