Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #71 from jtblin/master

Issue 70 - Make Rack::Cache multithread friendly
  • Loading branch information...
commit 5f0ce14d7c1da8b3fcebd917a09b4b2a0a2c053c 2 parents 687f8b8 + 40a7c50
Ryan Tomayko authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  lib/rack/cache/context.rb
  2. +1 −0  test/spec_setup.rb
2  lib/rack/cache/context.rb
View
@@ -45,7 +45,7 @@ def entitystore
# each request in a dup object unless the +rack.run_once+ variable is
# set in the environment.
def call(env)
- if env['rack.run_once']
+ if env['rack.run_once'] && !env['rack.multithread']
call! env
else
clone.call! env
1  test/spec_setup.rb
View
@@ -149,6 +149,7 @@ def cache_config(&block)
def request(method, uri='/', opts={})
opts = {
'rack.run_once' => true,
+ 'rack.multithread' => false,
'rack.errors' => @errors,
'rack-cache.storage' => @storage
}.merge(opts)

1 comment on commit 5f0ce14

Magnus Bergmark

Any chance of having a new patch release of rack-cache? It's been six months since the first bug fixes appeared, and I don't like having to specify gems from Github in my Gemfiles.

Please sign in to comment.
Something went wrong with that request. Please try again.