rack-cache 1.12.1 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rack/cache/meta_store.rb +5 -4
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: faa3fda2990457be314ac3643ed59e28487459ed4022c6ef1682c4922389dee7
4
- data.tar.gz: baf2634fa406e4c6da7e17339b4309217ba5ad99cda998fc67a0eeff369b513c
3
+ metadata.gz: 2d031263204dbdf38df4290dfcda6ebf48f349d69b6499a878e616a18f0ff914
4
+ data.tar.gz: a4153ac38a62c88f8bae3e760d1a903dfbb1ba641f086d1dbd32bca20a81d118
5
5
  SHA512:
6
- metadata.gz: 91d096f1cd9808a4d7983175af2549bc900a2b6ce3547799b30c11c8f9b233d874f0f1c6e64a36dbefda3161d12df50c696ba32e05f85ec7c34a825183499c01
7
- data.tar.gz: 510a3c91dc5b06a6f87985f846a001ab543679e909902cdef7a2ebf96bd3efdedfc9e2b778d959e51b379dddf5fbb8d3ae4adac085a18228af2694c285327df7
6
+ metadata.gz: c627fb81cd7eee48a3d54d9a07942b8b62b1fd480d1a89bfc58a717fd400a8f7e2d8453c336e2090c9bed92f410bf1f31a3bbe6a49f42d7b262e0da81c98b55d
7
+ data.tar.gz: 9329f2fd9d67707fd984a0dc9c8fc9030687d3b08e3a1a34a4efc168e5840d97be4dc065a3af6e7516ca821d1cf285ef7a29562b3d84788e6ae200b19c86b7c9
@@ -34,7 +34,7 @@ module Rack::Cache
34
34
 
35
35
  # find a cached entry that matches the request.
36
36
  env = request.env
37
- match = entries.detect{|req,res| requests_match?(res['Vary'], env, req)}
37
+ match = entries.detect{ |req,res| requests_match?((res['Vary'] || res['vary']), env, req) }
38
38
  return nil if match.nil?
39
39
 
40
40
  _, res = match
@@ -90,13 +90,14 @@ module Rack::Cache
90
90
  # the list
91
91
  vary = response.vary
92
92
  entries =
93
- read(key).reject do |env,res|
94
- (vary == res['Vary']) &&
93
+ read(key).reject do |env, res|
94
+ (vary == (res['Vary'] || res['vary'])) &&
95
95
  requests_match?(vary, env, stored_env)
96
96
  end
97
97
 
98
98
  headers = persist_response(response)
99
- headers.delete 'Age'
99
+ headers.delete('Age')
100
+ headers.delete('age')
100
101
 
101
102
  entries.unshift [stored_env, headers]
102
103
  if request.env['rack-cache.use_native_ttl'] && response.fresh?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tomayko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-16 00:00:00.000000000 Z
11
+ date: 2021-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0'
165
165
  requirements: []
166
- rubygems_version: 3.1.3
166
+ rubygems_version: 3.2.16
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: HTTP Caching for Rack