Honor amount argument instead of hard coding counter

This commit is contained in:
Gonzalo Rodriguez 2018-06-20 19:14:02 -03:00
parent 3af7394b6a
commit ca2e752937
No known key found for this signature in database
GPG key ID: 5DB8B81B049B8AB1

View file

@ -14,7 +14,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)
write(name, 1, options)
write(name, amount, options)
1
else