class MemCache
Attributes
read_error_callback[RW]
read_error_occurred[RW]
Public Instance Methods
cache_get(*args)
Also aliased as: cache_get_without_timeout_protection
Alias for: cache_get_with_timeout_protection
cache_get_with_timeout_protection(*args)
click to toggle source
# File lib/cachy/memcache_timeout_protection.rb, line 19 def cache_get_with_timeout_protection(*args) begin @read_error_occurred = false cache_get_without_timeout_protection(*args) rescue Exception => error @read_error_occurred = true if error.to_s == 'IO timeout' and self.class.read_error_callback self.class.read_error_callback.call error else raise error end end end
Also aliased as: cache_get