10

I've used various forks (mostly the ngmoco fork) of Nick Kallen's excellent cache_money for several Rails 2.3 based project, but we're now making the leap to Rails 3 which, thanks to the introduction of ActiveRelation, does not work with the popular forks of cache_money.

Is there a fork of cache_money, or an equivalent write-through cache, that is compatible with Rails 3 ?

Marc
  • 483
  • 2
  • 13

3 Answers3

3

Last week I launched a new write-through-cache gem for Rails 3, see https://github.com/orslumen/record-cache.

The reason I built it, is because we were using cache money and recently migrated to Rails 3. So chances are it may also serve you well.

Orslumen
  • 56
  • 2
2

second_level_cache is also a gem inspired by CacheMoney.

lulalala
  • 17,572
  • 15
  • 110
  • 169
2

There are a branch rails 3 in ngmoco fork to use you :

http://github.com/ngmoco/cache-money/tree/rails3

You can try it I don't know if it's really works.

You can add this in your Gemfile by

gem 'cache_money', :git => 'git://github.com/ngmoco/cache-money.git', :branch => 'rails3'
shingara
  • 46,608
  • 11
  • 99
  • 105
  • I hadn't seen the rails3 branch from ngmoco, which is surprising and embarrassing as thats the fork I use generally. I'm trying this out now – Marc Sep 29 '10 at 10:35
  • it's happen sometimes. No problem. If it's works, it's really great for you. We can hope it's works – shingara Sep 29 '10 at 10:44
  • Doesn't look like this is complete yet, it's not recognised as a valid gem source. "Could not find gem 'cache-money (>= 0, runtime)' in git://github.com/ngmoco/cache-money.git (at rails3). Source does not contain any versions of 'cache-money (>= 0, runtime)'" Maybe this is still a work in progress, I'll get in contact with the authors – Marc Sep 29 '10 at 11:36
  • 1
    you just need generate the gemspec in this repository. Fork the project, launch rake gemspec, commit the gemspec and use your fork in your Gemfile – shingara Sep 30 '10 at 11:22
  • I have managed to get it to run without errors as a plugin, and also as a gem with the missing gemspec in place. It doesn't appear to actually do any caching though, in fact it appears to do nothing whatsoever. I've configured it correctly, initialised it as it should be, added explicit indices. It loads and creates its objects and extends ActiveRecord as expected, but then does nothing. I'll keep digging – Marc Sep 30 '10 at 17:41
  • 2
    I've heard back from the guy working on the rails3 branch and he has confirmed that it is very much incomplete and he's gone back to the drawing board because of the ActiveRelation changes. – Marc Oct 01 '10 at 18:27