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:
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
|
||||
|
Loading…
Reference in New Issue
Block a user