Skip to content

Commit

Permalink
Update solic cache
Browse files Browse the repository at this point in the history
  • Loading branch information
caiohsramos committed Sep 30, 2024
1 parent d55099e commit 04dc9b1
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 69 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ GEM
activejob (>= 7.2)
activerecord (>= 7.2)
railties (>= 7.2)
solid_cache (0.7.0)
activejob (>= 7)
activerecord (>= 7)
railties (>= 7)
solid_cache (1.0.6)
activejob (>= 7.2)
activerecord (>= 7.2)
railties (>= 7.2)
solid_queue (1.0.0)
activejob (>= 7.1)
activerecord (>= 7.1)
Expand Down
5 changes: 3 additions & 2 deletions config/solid_cache.yml → config/cache.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
default: &default
database: <%= Rails.env %>
store_options:
max_age: <%= 1.week.to_i %>
# Cap age of oldest cache entry to fulfill retention policies
# max_age: <%= 60.days.to_i %>
max_size: <%= 256.megabytes %>
namespace: <%= Rails.env %>

Expand All @@ -12,4 +12,5 @@ test:
<<: *default

production:
database: cache
<<: *default
4 changes: 4 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ production:
<<: *default
database: storage/production_cable.sqlite3
migrations_paths: db/cable_migrate
cache:
<<: *default
database: storage/production_cache.sqlite3
migrations_paths: db/cache_migrate

2 changes: 1 addition & 1 deletion db/cable_schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ActiveRecord::Schema[7.1].define(version: 1) do
ActiveRecord::Schema[7.2].define(version: 1) do
create_table "solid_cable_messages", force: :cascade do |t|
t.binary "channel", limit: 1024, null: false
t.binary "payload", limit: 536870912, null: false
Expand Down
14 changes: 14 additions & 0 deletions db/cache_schema.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

ActiveRecord::Schema[7.2].define(version: 1) do
create_table "solid_cache_entries", force: :cascade do |t|
t.binary "key", limit: 1024, null: false
t.binary "value", limit: 536870912, null: false
t.datetime "created_at", null: false
t.integer "key_hash", limit: 8, null: false
t.integer "byte_size", limit: 4, null: false
t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size"
t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size"
t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true
end
end

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion db/queue_schema.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ActiveRecord::Schema[7.1].define(version: 1) do
ActiveRecord::Schema[7.2].define(version: 1) do
create_table "solid_queue_blocked_executions", force: :cascade do |t|
t.bigint "job_id", null: false
t.string "queue_name", null: false
Expand Down
13 changes: 1 addition & 12 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 04dc9b1

Please sign in to comment.