0

I am using aws elasticache for caching some files using redis. I am able to connect to the cache and see the keys using keys *. However when I try the following

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

it always results in a cache miss even though the key is present. This started happening 3 days ago (no change in code). Any help on how to debug this is appreciated.

Ayush Lodha
  • 181
  • 3
  • 14

1 Answers1

1

It is a parsing issue in the gem (redis-rails) I am using. The issue is available at https://github.com/redis-store/redis-rails/issues/25. The temporary solution is to use url format instead of hash format to configure Rails cache.

Ayush Lodha
  • 181
  • 3
  • 14