0.02
No commit activity in last 3 years
No release in over 3 years
Active Record caching and indexing in memcache.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 2.3.9
>= 1.0.0
>= 0.1.0
>= 1.0.0
 Project Readme

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:¶ ↑

require 'record_cache'

class User < ActiveRecord
  record_cache :by => :id
  record_cache :id, :by => :username
end

# These will use the cache now.
User.find(1)
User.find_by_id(2)
User.find_all_by_username('chuck')

Invalidation is handled for you using callbacks. Be careful though if you modify records directly using SQL. Both update_all and delete_all handle invalidations for you, but other direct SQL will not.

Install:¶ ↑

gem install record_cache

Dependencies:¶ ↑

RecordCache is confirmed to work with Rails 2.3.9. It does not currently work with Rails 3.

License:¶ ↑

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