solid_cache 1.0.4 → 1.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4166bf227d59acde335e056a12f2a382863fe469fa8417827e19da72bc12fb7b
4
- data.tar.gz: af1066a13d699e9ca3716c7b8b12f0b50e379b5cc5940757f613c51a08b9114a
3
+ metadata.gz: 9a27107ddce2c64a1884881e7cd3385533c32c1c13e2eee486a8c856de233c00
4
+ data.tar.gz: a1eb035fd95c8cadfbcce86603ed4ec2dcc0a133c9516101baf0dca94f1baf7d
5
5
  SHA512:
6
- metadata.gz: 8fe05aebd5d0279edb79654b8cd432efc78232d5f998b661d8026b23dcfb7ab73de74c407ce2594a15d01809a377711fb7bb8ffb060823619341ac0020564973
7
- data.tar.gz: 78995f9165d9f0c3da70bfe8499d89cf4fefb17cd7a5c8d0971815e21688ff71303b9da040a301aed7cf6bac46d6a6245c32657d170e4b1631278327715d110f
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 Queue as the production cache store, create `config/solid_cache.yml`, and alter `config/database.yml` to include the new cache database.
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[8.0].define(version: 1) do
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidCache
4
- VERSION = "1.0.4"
4
+ VERSION = "1.0.5"
5
5
  end
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
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-04 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.5.11
161
+ rubygems_version: 3.5.17
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: A database backed ActiveSupport::Cache::Store