【问题标题】:Elasticache redis cache miss but key is present.Elasticache redis 缓存未命中,但存在密钥。
【发布时间】:2015-11-04 08:22:46
【问题描述】:

我正在使用 aws elasticache 来缓存一些使用 redis 的文件。我能够连接到缓存并使用keys * 查看密钥。但是,当我尝试以下操作时

 input_text = Rails.cache.fetch("#{input_data_file_name}") do
   some code fetching file from s3
 end

即使存在密钥,它也总是会导致缓存未命中。这开始发生在 3 天前(代码没有变化)。任何有关如何调试的帮助表示赞赏。

【问题讨论】:

    标签: ruby-on-rails caching redis amazon-elasticache


    【解决方案1】:

    这是我正在使用的 gem (redis-rails) 中的一个解析问题。 该问题可在https://github.com/redis-store/redis-rails/issues/25 获得。 临时解决办法是使用url格式而不是hash格式来配置Rails缓存。

    【讨论】:

      猜你喜欢
      • 2013-05-01
      • 2021-04-24
      • 1970-01-01
      • 1970-01-01
      • 2020-05-02
      • 1970-01-01
      • 2017-11-01
      • 2017-03-18
      • 2016-03-22
      相关资源
      最近更新 更多