response_bank 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 957a84197155753d2caf49d54afce097d7a1a09811c967db2198f92e9767b0ba
|
4
|
+
data.tar.gz: 81d88f771d974341623fe5ed2cbc612ad4817f3511e28f31c9e753156f32d3a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0188e02f3f014798ad3c88da07268caef4bc3fca5edacec0750ea57a53107c8e43b28343dcb7e75d7cfc7ba970be7dcc3750627bb5fd6b76cf8bad253d08fde6'
|
7
|
+
data.tar.gz: 5d227ae976f8cac3074ea9e191866b36a5d6ed8b7a85dd7f553988509f957bf3dfc9ac5c620d7f065fe92f395fd66bc0a06642eaf6b81eb4e00487ab109c6586
|
@@ -21,6 +21,10 @@ module ResponseBank
|
|
21
21
|
params[:fill_cache] == "true"
|
22
22
|
end
|
23
23
|
|
24
|
+
def skip_browser_cache?
|
25
|
+
false
|
26
|
+
end
|
27
|
+
|
24
28
|
def serve_unversioned_cacheable_entry?
|
25
29
|
false
|
26
30
|
end
|
@@ -48,6 +52,7 @@ module ResponseBank
|
|
48
52
|
cache_age_tolerance: cache_age_tolerance_in_seconds,
|
49
53
|
serve_unversioned: serve_unversioned_cacheable_entry?,
|
50
54
|
force_refill_cache: force_refill_cache?,
|
55
|
+
skip_browser_cache: skip_browser_cache?,
|
51
56
|
headers: response.headers,
|
52
57
|
&block
|
53
58
|
)
|
@@ -13,6 +13,7 @@ module ResponseBank
|
|
13
13
|
serve_unversioned:,
|
14
14
|
headers:,
|
15
15
|
force_refill_cache: false,
|
16
|
+
skip_browser_cache: false,
|
16
17
|
cache_store: ResponseBank.cache_store,
|
17
18
|
&block
|
18
19
|
)
|
@@ -25,6 +26,7 @@ module ResponseBank
|
|
25
26
|
|
26
27
|
@serve_unversioned = serve_unversioned
|
27
28
|
@force_refill_cache = force_refill_cache
|
29
|
+
@skip_browser_cache = skip_browser_cache
|
28
30
|
@cache_store = cache_store
|
29
31
|
@headers = headers || {}
|
30
32
|
@key_schema_version = @env.key?('cacheable.key_version') ? @env.key['cacheable.key_version'] : CACHE_KEY_SCHEMA_VERSION
|
@@ -81,8 +83,10 @@ module ResponseBank
|
|
81
83
|
|
82
84
|
def try_to_serve_from_cache
|
83
85
|
# Etag
|
84
|
-
|
85
|
-
|
86
|
+
unless @skip_browser_cache
|
87
|
+
response = serve_from_browser_cache(entity_tag_hash, @env['HTTP_IF_NONE_MATCH'])
|
88
|
+
return response if response
|
89
|
+
end
|
86
90
|
|
87
91
|
response = serve_from_cache(cache_key_hash, @serve_unversioned ? "*" : entity_tag_hash, @cache_age_tolerance)
|
88
92
|
return response if response
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: response_bank
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Lütke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-09-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.4.
|
149
|
+
rubygems_version: 3.4.19
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Simple response caching for Ruby applications
|