1 class MemCache < Memcached::Rails
2 DEFAULT_OPTIONS = Memcached::DEFAULTS.merge(Memcached::Rails::DEFAULTS)
4 MemCacheError = Memcached::Error
8 def initialize(options = {})
9 options.reverse_merge! :namespace_separator => ":"
11 super(MEMCACHE_SERVERS, options)
13 @@connections.push(self)
15 ObjectSpace.define_finalizer(self, lambda { |connection|
16 @@connections.remove(connection)
25 if defined?(PhusionPassenger)
26 PhusionPassenger.on_event(:starting_worker_process) do |forked|
28 MemCache.connections.each { |connection| connection.reset }