rails-brotli-cache 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/benchmarks/main.rb +3 -2
- data/lib/rails-brotli-cache/store.rb +4 -1
- data/lib/rails-brotli-cache/version.rb +1 -1
- data/rails-brotli-cache.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38153c74bf09ef2a13760b3dea18a3a3e97790104b1af8a8d244ee104d0ad34e
|
4
|
+
data.tar.gz: ed7760dd1e7373fa7e855f57ec7082a185f68b114e43bd051d29fb4be7619020
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9430106e033158f55f6421d42253a8aaec9b62833687538a289010e8b67b1ffc4a75ba0b71071e5925b7256d2d070b5930719ebd40d5a60f28dc6d7cd4cd19
|
7
|
+
data.tar.gz: 47483feabfac21321eb6e4e6a0df6d5ffa8646261dbeb7b728897f3026f4deff699e682a4cf525f8cca79b824082173637baf9517d8e96c3cfd91aaf9b0b3291
|
data/README.md
CHANGED
@@ -1,8 +1,17 @@
|
|
1
|
-
# Rails Brotli Cache [](https://badge.fury.io/rb/rails-brotli-cache) [](https://badge.fury.io/rb/rails-brotli-cache) [](https://github.com/pawurb/rails-brotli-cache/actions)
|
2
2
|
|
3
3
|
This gem enables support for compressing Ruby on Rails cache entries using the [Brotli compression algorithm](https://github.com/google/brotli). `RailsBrotliCache::Store` offers better compression and performance compared to the default `Rails.cache` Gzip, regardless of the underlying data store. The gem also allows specifying any custom compression algorithm instead of Brotli.
|
4
4
|
|
5
|
-
|
5
|
+
You can check out [this blog post](https://pawelurbanek.com/rails-brotli-cache) describing the gem in more detail.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
`Gemfile`
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'brotli' # brotli is an optional dependency because other compressors are supported
|
13
|
+
gem 'rails-brotli-cache'
|
14
|
+
```
|
6
15
|
|
7
16
|
## Benchmarks
|
8
17
|
|
data/benchmarks/main.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'active_support'
|
2
|
+
require 'active_support/core_ext/hash'
|
3
3
|
require 'net/http'
|
4
4
|
require 'rails-brotli-cache'
|
5
|
+
require 'benchmark'
|
5
6
|
|
6
7
|
memory_cache = ActiveSupport::Cache::MemoryStore.new(compress: true) # memory store does not use compression by default
|
7
8
|
brotli_memory_cache = RailsBrotliCache::Store.new(memory_cache)
|
data/rails-brotli-cache.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.license = "MIT"
|
18
18
|
gem.add_dependency "activesupport"
|
19
|
-
gem.
|
19
|
+
gem.add_development_dependency "brotli"
|
20
20
|
gem.add_development_dependency "rspec"
|
21
21
|
gem.add_development_dependency "railties"
|
22
22
|
gem.add_development_dependency "activemodel"
|
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
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
|
-
type: :
|
34
|
+
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|