Permalink
Browse files

Merge pull request #224 from mreinsch/retry_flush

retry flush in case it failed
  • Loading branch information...
2 parents f155277 + 244cb62 commit 4a98fed543c309fb42cf503b031302a704de2311 @mperham mperham committed Jun 4, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/active_support/cache/dalli_store.rb
@@ -163,6 +163,10 @@ def decrement(name, amount = 1, options=nil)
# be used with care when using a shared cache.
def clear(options=nil)
@data.flush_all
+ rescue Dalli::DalliError => e
+ logger.error("DalliError: #{e.message}") if logger
+ raise if @raise_errors
+ nil
end
# Get the statistics from the memcached servers.

0 comments on commit 4a98fed

Please sign in to comment.