Default increment amount to 1 as RedisCacheStore

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

View file

@ -8,7 +8,7 @@ module Rack
defined?(::ActiveSupport::Cache::RedisCacheStore) && store.is_a?(::ActiveSupport::Cache::RedisCacheStore)
end
def increment(name, amount, options = {})
def increment(name, amount = 1, options = {})
# RedisCacheStore#increment ignores options[:expires_in].
#
# So in order to workaround this we use RedisCacheStore#write (which sets expiration) to initialize