Skip to content

Commit

Permalink
Replace redis.pipeline with multi
Browse files Browse the repository at this point in the history
  • Loading branch information
lipanski committed Dec 30, 2023
1 parent 4fcb71e commit 004b193
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/defense/redis_store.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 004b193

Please sign in to comment.