rails-brotli-cache 0.3.11 → 0.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-brotli-cache/store.rb +8 -2
- data/lib/rails-brotli-cache/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 473f7e06756e422c9c3644f6eb8fbd97fb3c6929d74d5ede901c037c93df7db1
|
4
|
+
data.tar.gz: 25ce534d47267870cb70eb49ac849f4dc60073944372b3d26fd81a01dd360834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e13c7a3fb0c0591dbb9dd4ccac8bf97aaf9d51ce1ec1d793fd08c678f6d8ba75b65f45f6612a12bbf8a76fc49d7865f591d466753b0d699f474fd33cc8413ab0
|
7
|
+
data.tar.gz: 4f0d2fc6e0e2e17e3212a53709fc31831bc62394daad757e1060a323dd46031daaa3ac72be67df254cfd4df8dd71751d31c70567eb217e25ec614dadc29792d3
|
@@ -62,6 +62,7 @@ module RailsBrotliCache
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def write_multi(hash, options = nil)
|
65
|
+
options ||= {}
|
65
66
|
new_hash = hash.map do |key, val|
|
66
67
|
[
|
67
68
|
cache_key(key),
|
@@ -69,7 +70,10 @@ module RailsBrotliCache
|
|
69
70
|
]
|
70
71
|
end
|
71
72
|
|
72
|
-
@core_store.write_multi(
|
73
|
+
@core_store.write_multi(
|
74
|
+
new_hash,
|
75
|
+
options.merge(compress: false)
|
76
|
+
)
|
73
77
|
end
|
74
78
|
|
75
79
|
def read_multi(*names)
|
@@ -85,7 +89,9 @@ module RailsBrotliCache
|
|
85
89
|
options = names.extract_options!
|
86
90
|
names = names.map { |name| cache_key(name) }
|
87
91
|
|
88
|
-
@core_store.fetch_multi(
|
92
|
+
@core_store.fetch_multi(
|
93
|
+
*names, options.merge(compress: false)
|
94
|
+
) do |name|
|
89
95
|
compressed(yield(name), options)
|
90
96
|
end
|
91
97
|
end
|