rails-brotli-cache 0.4.0 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/benchmarks/Gemfile +1 -1
- data/lib/rails-brotli-cache/store.rb +5 -7
- data/lib/rails-brotli-cache/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: 733ccaba5b7f8c9e419556a31a8abc1c5a21d3b6421c2b8c3448d8f1faa5f75c
|
4
|
+
data.tar.gz: 9b1c4366b7cc1c49cd31eb7258c01dfda204f31fcc1a9ce55dd28035b5c83ce1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aadb3e61be2fefb5739c92ccb477605e6550224294ec4f4eabc71d21de068ef4b93f307a02d6e8633ab6001bc98f4c477f961811d30ee88d7a25d3ec5b04157
|
7
|
+
data.tar.gz: 0cfc2f0747af9d2a088f69a0c8b68d765b01ac9f1448ebafcd73a7dfa4c0dc0d0e60fd2a49b1ba6438f6bef3a5936bb19850db57282e9af2ff56c49f7e0cc4c6
|
data/benchmarks/Gemfile
CHANGED
@@ -6,7 +6,7 @@ require 'brotli'
|
|
6
6
|
module RailsBrotliCache
|
7
7
|
class Store < ::ActiveSupport::Cache::Store
|
8
8
|
COMPRESS_THRESHOLD = ENV.fetch("BR_CACHE_COMPRESS_THRESHOLD", 1).to_f * 1024.0
|
9
|
-
BR_COMPRESS_QUALITY = ENV.fetch("BR_CACHE_COMPRESS_QUALITY",
|
9
|
+
BR_COMPRESS_QUALITY = ENV.fetch("BR_CACHE_COMPRESS_QUALITY", 6).to_i
|
10
10
|
MARK_BR_COMPRESSED = "\x02".b
|
11
11
|
|
12
12
|
class BrotliCompressor
|
@@ -128,14 +128,12 @@ module RailsBrotliCache
|
|
128
128
|
@core_store.clear
|
129
129
|
end
|
130
130
|
|
131
|
-
def increment(
|
132
|
-
|
133
|
-
@core_store.increment(*args)
|
131
|
+
def increment(name, amount = 1, **options)
|
132
|
+
@core_store.increment(cache_key(name), amount, **options)
|
134
133
|
end
|
135
134
|
|
136
|
-
def decrement(
|
137
|
-
|
138
|
-
@core_store.decrement(*args)
|
135
|
+
def decrement(name, amount = 1, **options)
|
136
|
+
@core_store.decrement(cache_key(name), amount, **options)
|
139
137
|
end
|
140
138
|
|
141
139
|
def self.supports_cache_versioning?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-brotli-cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|