rtomayko/rack-cache — pull request #71 by jtblin (2012-08-04 06:21:05+00:00)
Title: Issue 70 - Make Rack::Cache multithread friendly

As described in https://github.com/rtomayko/rack-cache/issues/70, this will fix the issue with asstes not being loaded correctly when using puma, a multithreaded ruby app server. This changes /lib/rack/cache/context.rb call method from

def call(env)
if env['rack.run_once']
call! env
else
clone.call! env
end
end

to

def call(env)
if env['rack.run_once'] && !env['rack.multithread']
call! env
else
clone.call! env
end
end

Let me know what you think.