I tried doing the def index(*args); end;
trick within the models I'd like cache_money to ignore, but to no avail.
2 Answers
commenting out index()
will only turn off indexes for that object. But the default index by id will still run.
I have it working, but am in the process of getting the fix upstream. http://github.com/kbrock/cache_money if you want to test it out before hand. example:
class model < ActiveRecord:Base
is_cache(false)
#...
end
best of luck and let me know how it goes.

- 958
- 12
- 15
-
This looks like a good idea, I think it is `is_cached` with a 'd' on the end though. – Brian Armstrong Mar 02 '11 at 00:44
Noticed Keenan's branch is offline -- I've also made a cache-money fork on GitHub which does not automatically cache every model unless you put "automatic_caching: true" in your memcached.yml http://github.com/jamiew/cache-money
Just add "is_cached :repository => $cache" explicitly in each model you want to cache.
Unfortunately this isn't generally available as a gem yet, but I'll see about getting my changes into ngmoco-cache-money (official cache-money appears dead)

- 816
- 7
- 12