views:

178

answers:

2

I tried doing the def index(*args); end; trick within the models I'd like cache_money to ignore, but to no avail.

+1  A: 

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.

Keenan Brock
A: 

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)

jamiew