4

I recently inherited a Rails 2.3 application that I'm now trying to upgrade to Rails 3. Cache-money is an integral part of the application so I want to make sure we have the same functionality in place when we go to Rails 3. However, my research on the subject has shown that cache-money is not compatible with Rails 3 (due to the use of unsupported AR methods :find_every and :find_from_ids).

I've seen a couple of comments and blogs mention that implementing the type of write through caching with Rails 3 that cache-money provided should be a trivial task. Any ideas on how to approach implementing write through caching with Rails 3?

4

1 回答 1

1

上周我为 Rails 3 推出了一个新的 write-through-cache gem,参见 https://github.com/orslumen/record-cache

我构建它的原因是因为我们在 Rails 2.3 项目中使用缓存资金,并且最近迁移到 Rails 3。所以很有可能,它也会很好地为您服务。

在 Rails 3 中编写自己的 write-though 缓存对我来说听起来不是一件容易的事。如果您确实找到了一种简单的方法,请务必复制我的内容。

于 2011-10-11T00:16:13.340 回答