puffing-billy 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/billy/cache.rb +2 -0
- data/lib/billy/handlers/proxy_handler.rb +3 -3
- data/lib/billy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ba63b8d1332e409066b96b5e01205be8503dee2e3bb11ad8863df3c8c5586d2
|
4
|
+
data.tar.gz: 8a8cee9e25a6c5cf5cdfc9fa5c3eb3a176827447ec41a0891351808cf1a67bca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93c40d01325be4deb136bec1e3f0c5f375475669dd2b44a535733bbc54976eca5d7bcce58b2688ca916303a45dbb6f7bcf2df3bc20fdcdb7a18ab1c7e0bcda4f
|
7
|
+
data.tar.gz: 4b66a6c0242bed4283dafdb5d7a68a9dc9357ab5ce75e87824afd0dd1b68fecf686863b242c95b8ddc239efb003423c9dd7687ff042228a16cbf1aad0b2e8fe2
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
v3.0.3, 2022-05-31
|
2
|
+
-------------------
|
3
|
+
* Only calculate cache scope and key if request is cacheable [#324](https://github.com/oesmith/puffing-billy/pull/324)
|
4
|
+
|
1
5
|
v3.0.2, 2022-02-16
|
2
6
|
-------------------
|
3
7
|
* Add rake tasks inside files DSL in gemspec [#321](https://github.com/oesmith/puffing-billy/pull/321)
|
data/lib/billy/cache.rb
CHANGED
@@ -25,9 +25,6 @@ module Billy
|
|
25
25
|
port: Billy.config.proxied_request_port }} )
|
26
26
|
end
|
27
27
|
|
28
|
-
cache_scope = Billy::Cache.instance.scope
|
29
|
-
cache_key = Billy::Cache.instance.key(method.downcase, url, body)
|
30
|
-
|
31
28
|
req = EventMachine::HttpRequest.new(url, opts)
|
32
29
|
req = req.send(method.downcase, build_request_options(url, headers, body))
|
33
30
|
|
@@ -47,6 +44,9 @@ module Billy
|
|
47
44
|
end
|
48
45
|
|
49
46
|
if cacheable?(url, response[:headers], response[:status])
|
47
|
+
cache_scope = Billy::Cache.instance.scope
|
48
|
+
cache_key = Billy::Cache.instance.key(method.downcase, url, body)
|
49
|
+
|
50
50
|
Billy::Cache.instance.store(
|
51
51
|
cache_key,
|
52
52
|
cache_scope,
|
data/lib/billy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puffing-billy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olly Smith
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|