diff --git a/lib/rack/cache/context.rb b/lib/rack/cache/context.rb index 56d3239..a35caaa 100644 --- a/lib/rack/cache/context.rb +++ b/lib/rack/cache/context.rb @@ -18,6 +18,7 @@ class Context def initialize(backend, options={}) @backend = backend @trace = [] + @env = nil initialize_options options yield self if block_given? diff --git a/lib/rack/cache/metastore.rb b/lib/rack/cache/metastore.rb index 0d1ac8c..3f04415 100644 --- a/lib/rack/cache/metastore.rb +++ b/lib/rack/cache/metastore.rb @@ -37,7 +37,7 @@ def lookup(request, entity_store) match = entries.detect{|req,res| requests_match?(res['Vary'], env, req)} return nil if match.nil? - req, res = match + _, res = match if body = entity_store.open(res['X-Content-Digest']) restore_response(res, body) else