Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Active Record caching and indexing in memcache. An alternative to cache_fu
Ruby
Tag: v0.9.5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
LICENSE
README.rdoc
Rakefile
VERSION.yml
record_cache.gemspec

README.rdoc

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:

First, install the after_commit plugin from: github.com/ninjudd/after_commit

Then install the following gems:

sudo gem install ninjudd-deferrable -s http://gems.github.com
sudo gem install ninjudd-ordered_set -s http://gems.github.com
sudo gem install ninjudd-memcache -s http://gems.github.com
sudo gem install ninjudd-cache_version -s http://gems.github.com
sudo gem install ninjudd-record_cache -s http://gems.github.com

License:

Copyright © 2009 Justin Balthrop, Geni.com; Published under The MIT License, see LICENSE

Something went wrong with that request. Please try again.