Elasticache redis 缓存未命中但密钥存在。

Elasticache redis cache miss but key is present.

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

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

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

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