From 004b193fb176f75c0096e3cea0aa3515efacb478 Mon Sep 17 00:00:00 2001 From: Florin Lipan Date: Sat, 30 Dec 2023 14:50:32 +0100 Subject: [PATCH] Replace redis.pipeline with multi --- src/defense/redis_store.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/defense/redis_store.cr b/src/defense/redis_store.cr index f684440..1049a4d 100644 --- a/src/defense/redis_store.cr +++ b/src/defense/redis_store.cr @@ -15,9 +15,9 @@ module Defense def increment(unprefixed_key : String, expires_in : Int32) : Int64 key = prefix_key(unprefixed_key) - @redis.pipeline do |pipe| - pipe.incr(key) - pipe.expire(key, expires_in) + @redis.multi do |r| + r.incr(key) + r.expire(key, expires_in) end.first.as(Int64) end