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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 557f25039474c31f96924767eaa99756e7171355f531239fb8452770d7ceb8fd
4
- data.tar.gz: 2b719db3b62c8b2711961e4ab5ce7a9543fdb03f33739a2e48ead12c80af284a
3
+ metadata.gz: 9a27107ddce2c64a1884881e7cd3385533c32c1c13e2eee486a8c856de233c00
4
+ data.tar.gz: a1eb035fd95c8cadfbcce86603ed4ec2dcc0a133c9516101baf0dca94f1baf7d
5
5
  SHA512:
6
- metadata.gz: 25187adeb93d8e1edfdfc4e754a9c064b61e128a3d5ca96a3c7b8d523b61aca3cb689878be0079c6cd387baf91cd5de8c57ae331a6efa82d087fe0123587e1bd
7
- data.tar.gz: 55ed9ccacea8c5de554147d838a6ccb4c64970d1c8479c226114179bfd93e2680f2b1d77196b2b86393047bd2052e11df44310c4f24b6002735ad5bba5c0dcd3
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,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_support"
4
+ require "active_record"
4
5
 
5
6
  module SolidCache
6
7
  class Engine < ::Rails::Engine
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidCache
4
- VERSION = "1.0.3"
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.3
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-03 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