Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure MemCacheStore logger exists

  • Loading branch information...
commit eed89e65b6320a59115da0c5ef004c727e0f9cbf 1 parent d18ff1b
@josh josh authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 activesupport/lib/active_support/cache/mem_cache_store.rb
View
6 activesupport/lib/active_support/cache/mem_cache_store.rb
@@ -64,7 +64,7 @@ def read(key, options = nil) # :nodoc:
@data.get(key, raw?(options))
end
rescue MemCache::MemCacheError => e
- logger.error("MemCacheError (#{e}): #{e.message}")
+ logger.error("MemCacheError (#{e}): #{e.message}") if logger
nil
end
@@ -85,7 +85,7 @@ def write(key, value, options = nil)
response == Response::STORED
end
rescue MemCache::MemCacheError => e
- logger.error("MemCacheError (#{e}): #{e.message}")
+ logger.error("MemCacheError (#{e}): #{e.message}") if logger
false
end
@@ -95,7 +95,7 @@ def delete(key, options = nil) # :nodoc:
response == Response::DELETED
end
rescue MemCache::MemCacheError => e
- logger.error("MemCacheError (#{e}): #{e.message}")
+ logger.error("MemCacheError (#{e}): #{e.message}") if logger
false
end
Please sign in to comment.
Something went wrong with that request. Please try again.