我正在玩 Rails 的缓存。我的更改按以下顺序在 development.rb 中:
- config.cache_store = :file_store, "#{Rails.root}/tmp/cache"
- config.cache_store = :dalli_store, { :namespace => 'pinukimmm', :expires_in => 1.day, :compress => true }
- config.cache_store = :redis_store, "redis://localhost:6379/0/cache", { expires_in: 90.minutes }
:file_store 因没有缓存而显着提升。增加约 900%。但是后来我用 :dalli_store 改成 memcached,性能甚至略有下降,这是出乎意料的。然后我觉得这家商店可能有问题,所以我尝试了:redis_store。结果相同。
这里有什么问题?