From 01f03aa07f745edf03d05f25651a63c59d31a0b6 Mon Sep 17 00:00:00 2001 From: Eric Entin Date: Wed, 17 Jun 2009 10:16:16 -0400 Subject: [PATCH] Added a reset method to ActiveSupport::Cache::MemCacheStore. --- .../lib/active_support/cache/mem_cache_store.rb | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 38b3409..38f8ad5 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -128,6 +128,14 @@ module ActiveSupport def stats @data.stats end + + # Resets the connection to the memcached server. Call this if you + # use Phusion Passenger's smart spawning mode and you need to + # start a new connection to the server to prevent spawned processes + # from sharing file descriptors. + def reset + @data.reset + end private def expires_in(options) -- 1.6.3.2