RedisCacheStore - Fix Default Error Handler

* The `DEFAULT_ERROR_HANDLER` constant in
  `ActiveSupport::Cache::RedisCacheStore` contained references
  to an undefined argument `e`, which is supposed to refer
  to the `exception` parameter.
* Update the default error handler proc to correctly reference
  the `exception` parameter.
This commit is contained in:
Jesse Doyle 2017-12-13 20:49:48 -07:00 committed by Jeremy Daer
parent edc54fd206
commit 3629197034

@ -47,9 +47,11 @@ class RedisCacheStore < Store
reconnect_attempts: 0,
}
DEFAULT_ERROR_HANDLER = -> (method:, returning:, exception:) {
logger.error { "RedisCacheStore: #{method} failed, returned #{returning.inspect}: #{e.class}: #{e.message}" } if logger
}
DEFAULT_ERROR_HANDLER = -> (method:, returning:, exception:) do
if logger
logger.error { "RedisCacheStore: #{method} failed, returned #{returning.inspect}: #{exception.class}: #{exception.message}" }
end
end
DELETE_GLOB_LUA = "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end"
private_constant :DELETE_GLOB_LUA