Created
April 15, 2010 06:36
-
-
Save jfernandez/366768 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(PhusionPassenger) | |
PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
if forked | |
# Rails cache_store | |
Rails.cache.instance_variable_get(:@data).reset if Rails.cache.class == ActiveSupport::Cache::MemCacheStore | |
# Reset the session_store, value could be nil depending on how you set it up | |
ActionController::Base.session_options[:cache].reset | |
# Reset the cache_fu connection (if used) | |
CACHE.reset if defined?(CACHE) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment