From d931550d2dc29869ff3cbb5d597b05d1acc7a801 Mon Sep 17 00:00:00 2001 From: Jeffrey Hardy Date: Sat, 23 Aug 2008 20:26:48 -0400 Subject: [PATCH] Don't log an error on Memcached::NotFound since it's the normal behavior when a key can't be found --- lib/active_support/cache/libmemcached_store.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/active_support/cache/libmemcached_store.rb b/lib/active_support/cache/libmemcached_store.rb index fea278e..7f5b665 100644 --- a/lib/active_support/cache/libmemcached_store.rb +++ b/lib/active_support/cache/libmemcached_store.rb @@ -34,6 +34,8 @@ def initialize(*addresses) def read(key, options = nil) super @cache.get(key, marshal?(options)) + rescue Memcached::NotFound + nil rescue Memcached::Error => e log_error(e) nil