Log an error to the console when the memcache server is raising
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8687 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
7701e6466d
commit
29938ba0f0
|
@ -15,21 +15,24 @@ module ActiveSupport
|
|||
def read(key, options = nil)
|
||||
super
|
||||
@data.get(key, raw?(options))
|
||||
rescue MemCache::MemCacheError
|
||||
rescue MemCache::MemCacheError => e
|
||||
logger.error("MemCacheError (#{e}): #{e.message}")
|
||||
nil
|
||||
end
|
||||
|
||||
def write(key, value, options = nil)
|
||||
super
|
||||
@data.set(key, value, expires_in(options), raw?(options))
|
||||
rescue MemCache::MemCacheError
|
||||
rescue MemCache::MemCacheError => e
|
||||
logger.error("MemCacheError (#{e}): #{e.message}")
|
||||
nil
|
||||
end
|
||||
|
||||
def delete(key, options = nil)
|
||||
super
|
||||
@data.delete(key, expires_in(options))
|
||||
rescue MemCache::MemCacheError
|
||||
rescue MemCache::MemCacheError => e
|
||||
logger.error("MemCacheError (#{e}): #{e.message}")
|
||||
nil
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue