1

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

Ryan Bigg
  • 106,965
  • 23
  • 235
  • 261
Kyle
  • 1,054
  • 2
  • 14
  • 27

2 Answers2

1

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.

kbrock
  • 958
  • 12
  • 15
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)

jamiew
  • 816
  • 7
  • 12