I tried doing the def index(*args); end;
trick within the models I'd like cache_money to ignore, but to no avail.
How do I disable cache_money caching for certain ActiveRecord models
516 Views Asked by Kyle At
2
There are 2 best solutions below
0

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)
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:
best of luck and let me know how it goes.