Commit f93586110f68d063d3d0e6efe0173ebcf07b6448
Exists in
master
and in
29 other branches
Merge branch 'ai3109' into 'master'
Support passenger on production http://noosfero.org/Development/ActionItem3109 See merge request !233
Showing
1 changed file
with
9 additions
and
0 deletions
Show diff stats
@@ -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 |