0

我正在玩 Rails 的缓存。我的更改按以下顺序在 development.rb 中:

  1. config.cache_store = :file_store, "#{Rails.root}/tmp/cache"
  2. config.cache_store = :dalli_store, { :namespace => 'pinukimmm', :expires_in => 1.day, :compress => true }
  3. config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }

:file_store 因没有缓存而显着提升。增加约 900%。但是后来我用 :dalli_store 改成 memcached,性能甚至略有下降,这是出乎意料的。然后我觉得这家商店可能有问题,所以我尝试了:redis_store。结果相同。

这里有什么问题?

4

1 回答 1

0

事实证明它没有任何问题。小缓存元素就是如此。但它可以很好地适应更大的数据。

于 2013-05-30T13:45:15.197 回答