【问题标题】:Rails cache_store with memcached or redis does not produce performace boost带有 memcached 或 redis 的 Rails cache_store 不会产生性能提升
【发布时间】:2013-05-26 01:38:48
【问题描述】:

我正在使用 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。结果相同。

这里可能出了什么问题?

【问题讨论】:

    标签: ruby-on-rails caching redis memcached benchmarking


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-02
      • 2020-10-19
      • 2015-06-01
      • 2011-12-22
      相关资源
      最近更新 更多