instance method
failsafe
Ruby on Rails 7.1.6
Since v5.2.8.1 PrivateSignature
failsafe(method, returning: nil)
No documentation comment.
Parameters
-
methodreq -
returningkey = nil
Source
# File activesupport/lib/active_support/cache/redis_cache_store.rb, line 478
def failsafe(method, returning: nil)
yield
rescue ::Redis::BaseError => error
@error_handler&.call(method: method, exception: error, returning: returning)
returning
end
Defined in activesupport/lib/active_support/cache/redis_cache_store.rb line 478
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Cache::RedisCacheStore