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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f95297d5e14bdcdef5195541bdcde94c2c0cbbf91cf4cb546f77edce9e67c5b
4
- data.tar.gz: 7c0d650a47162ecc053fa3dca2c7824f3b9de173289321212c57d600afa87897
3
+ metadata.gz: 733ccaba5b7f8c9e419556a31a8abc1c5a21d3b6421c2b8c3448d8f1faa5f75c
4
+ data.tar.gz: 9b1c4366b7cc1c49cd31eb7258c01dfda204f31fcc1a9ce55dd28035b5c83ce1
5
5
  SHA512:
6
- metadata.gz: c5fcbc3d4605329e227ca69fe94d320e16ea3f825babb6fa547e384df51b15879553800960615e1db9f24b3123747a07a9411837b6a5d9ff03591564f09a7840
7
- data.tar.gz: 8e9200b30e53bdabee4f4f803384c84247aea22fb4e42d838e7eedd09fb8843b06b336f0ed4de401687a61a9dcd5ec37f51ade8daf3af8c322be1aace241e53d
6
+ metadata.gz: 2aadb3e61be2fefb5739c92ccb477605e6550224294ec4f4eabc71d21de068ef4b93f307a02d6e8633ab6001bc98f4c477f961811d30ee88d7a25d3ec5b04157
7
+ data.tar.gz: 0cfc2f0747af9d2a088f69a0c8b68d765b01ac9f1448ebafcd73a7dfa4c0dc0d0e60fd2a49b1ba6438f6bef3a5936bb19850db57282e9af2ff56c49f7e0cc4c6
data/benchmarks/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails-brotli-cache'
3
+ gem 'rails-brotli-cache', path: "../"
4
4
  gem 'redis'
5
5
  gem 'dalli'
@@ -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", 5).to_i
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(*args)
132
- args[0] = cache_key(args[0])
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(*args)
137
- args[0] = cache_key(args[0])
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?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsBrotliCache
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.2"
5
5
  end
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.0
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-03 00:00:00.000000000 Z
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails