This project is archived and is in readonly mode.

#2812 ✓stale
Eric Entin

[patch] Add a method to MemCacheStore to reset the connection to memcached

Reported by Eric Entin | June 17th, 2009 @ 03:28 PM | in 3.x

When you're using Phusion Passenger's smart spawning mode, file descriptors get shared between all of the new processes. This means that you have to close and re-open any persistent connections (such as memcached) that your Rails app has. If you are using Rails' integrated cache, this is difficult without either monkey-patching ActiveSupport::Cache::MemCacheStore or using instance_variable_get. I don't think either of those are clean solutions so I created this patch, which is literally three lines of code. I didn't include a test for the method because the stats and clear methods of MemCacheStore aren't tested either, and this one's along the same lines. Let me know if I missed anything!

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>