From d5a240d9d2427d97153a458139b63b7ca4312b94 Mon Sep 17 00:00:00 2001 From: Ryan Laughlin Date: Mon, 18 May 2020 17:14:12 -0400 Subject: [PATCH] Fix deprecation warning in Rails 5.2.4.3 --- lib/rack/attack/store_proxy/redis_cache_store_proxy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb b/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb index 380215f..f57c6d5 100644 --- a/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb +++ b/lib/rack/attack/store_proxy/redis_cache_store_proxy.rb @@ -15,7 +15,7 @@ module Rack # # So in order to workaround this we use RedisCacheStore#write (which sets expiration) to initialize # the counter. After that we continue using the original RedisCacheStore#increment. - if options[:expires_in] && !read(name) + if options[:expires_in] && !read(name, raw: true) write(name, amount, options) amount