Created
August 24, 2009 21:25
-
-
Save agibralter/174221 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.instance_variable_get(:@data).reset if Rails.cache.class == ActiveSupport::Cache::MemCacheStore | |
ActionController::Base.session_options[:cache].reset | |
end | |
end | |
end | |
# ... |
Hmm I'm not too sure of the specific syntax for Rails 3... but I'm sure the idea is similar.
https://github.com/rails/rails/blob/v3.0.5/actionpack/lib/action_dispatch/middleware/session/mem_cache_store.rb
https://github.com/rails/rails/blob/v3.0.5/activesupport/lib/active_support/cache.rb
As for where to put it... perhaps in an config/initializers
?
Sorry... I haven't upgraded to Rails 3 yet...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know this is an old one, but any ideas how to do it on RoR3?