solid_cache 1.0.3 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -7
- data/lib/generators/solid_cache/install/templates/db/cache_schema.rb +1 -1
- data/lib/solid_cache/engine.rb +1 -0
- data/lib/solid_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: 9a27107ddce2c64a1884881e7cd3385533c32c1c13e2eee486a8c856de233c00
|
4
|
+
data.tar.gz: a1eb035fd95c8cadfbcce86603ed4ec2dcc0a133c9516101baf0dca94f1baf7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d0633c3f33b02df9f18e0f77b1ca6b200333bd6961d74af4462311a2ede3f264f6bf6f845da48ed187049affa9984f9aa43cfa39529ddaf192715c3940445bc
|
7
|
+
data.tar.gz: 819e979a65563ec3ce5e16c09b8800a80e5764b63938f1e7e2b64d38ea453a06dec8f6ba63c8589cd4bbff05632b65d47c595de5c949997ef18f47305435cfd5
|
data/README.md
CHANGED
@@ -8,9 +8,38 @@ Solid Cache is configured by default in new Rails 8 applications. But if you're
|
|
8
8
|
|
9
9
|
1. `bundle add solid_cache`
|
10
10
|
2. `bin/rails solid_cache:install`
|
11
|
-
3. `bin/rails db:migrate`
|
12
11
|
|
13
|
-
This will configure Solid
|
12
|
+
This will configure Solid Cache as the production cache store, create `config/solid_cache.yml`, create `db/cache_schema.rb`, and attempt to alter `config/database.yml` to include the new cache database.
|
13
|
+
|
14
|
+
If you've already made material changes to your `config/database.yml` file, the installer may not be able to add the cache db configuration directly. If you need to do it yourself, this is what it should look like:
|
15
|
+
|
16
|
+
```yaml
|
17
|
+
production:
|
18
|
+
primary:
|
19
|
+
<<: *default
|
20
|
+
database: storage/production.sqlite3
|
21
|
+
cache:
|
22
|
+
<<: *default
|
23
|
+
database: storage/production_cache.sqlite3
|
24
|
+
migrations_paths: db/cache_migrate
|
25
|
+
```
|
26
|
+
|
27
|
+
...or if you're using MySQL/PostgreSQL/Trilogy:
|
28
|
+
|
29
|
+
```yaml
|
30
|
+
production:
|
31
|
+
primary: &primary_production
|
32
|
+
<<: *default
|
33
|
+
database: app_production
|
34
|
+
username: app
|
35
|
+
password: <%= ENV["APP_DATABASE_PASSWORD"] %>
|
36
|
+
cache:
|
37
|
+
<<: *primary_production
|
38
|
+
database: app_production_cache
|
39
|
+
migrations_paths: db/cache_migrate
|
40
|
+
```
|
41
|
+
|
42
|
+
Then run `db:prepare` in production to ensure the database is created and the schema is loaded.
|
14
43
|
|
15
44
|
## Configuration
|
16
45
|
|
@@ -178,11 +207,6 @@ config.solid_cache.encryption_context_properties = {
|
|
178
207
|
}
|
179
208
|
```
|
180
209
|
|
181
|
-
**Note**
|
182
|
-
|
183
|
-
Encryption currently does not work for PostgreSQL, as Rails does not yet support encrypting binary columns for it.
|
184
|
-
See https://github.com/rails/rails/pull/52650.
|
185
|
-
|
186
210
|
## Index size limits
|
187
211
|
The Solid Cache migrations try to create an index with 1024 byte entries. If that is too big for your database, you should:
|
188
212
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
ActiveRecord::Schema[
|
3
|
+
ActiveRecord::Schema[7.1].define(version: 1) do
|
4
4
|
create_table "solid_cache_entries", force: :cascade do |t|
|
5
5
|
t.binary "key", limit: 1024, null: false
|
6
6
|
t.binary "value", limit: 536870912, null: false
|
data/lib/solid_cache/engine.rb
CHANGED
data/lib/solid_cache/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solid_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donal McBreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|