Commit 5b2efde3738557ffe26618a8c91c277f36613568

Authored by Braulio Bhavamitra
1 parent d08608af

Support passenger

(ActionItem3109)
Showing 1 changed file with 9 additions and 0 deletions   Show diff stats
config/initializers/passenger.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +if defined? PhusionPassenger
  2 +
  3 + # from http://russbrooks.com/2010/10/20/rails-cache-memcache-on-passenger-with-smart-spawning
  4 + PhusionPassenger.on_event :starting_worker_process do |forked|
  5 + if forked
  6 + Rails.cache.instance_variable_get(:@data).reset if Rails.cache.class == ActiveSupport::Cache::MemCacheStore
  7 + end
  8 + end
  9 +end