diff --git a/Gemfile b/Gemfile index e3ca47e3..63d5b910 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ gem 'rack', '~> 3.0.11' # DB & Cache gem 'pg', '>= 0.18', '< 2.0' -gem "solid_cache", "~> 0.7.0" +gem "solid_cache", "~> 1.0.6" # Logger gem 'lograge', '~> 0.14.0' diff --git a/Gemfile.lock b/Gemfile.lock index 37edc769..ac45dee9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -562,10 +562,10 @@ GEM actionpack (>= 3.1) railties (>= 3.1) slim (>= 3.0, < 6.0, != 5.0.0) - 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) ssrf_filter (1.1.2) stimulus-rails (1.3.4) railties (>= 6.0.0) @@ -699,7 +699,7 @@ DEPENDENCIES sentry-ruby (~> 5.19.0) simple_form (~> 5.3) slim-rails (~> 3.6.3) - solid_cache (~> 0.7.0) + solid_cache (~> 1.0.6) stimulus-rails (~> 1.3.4) sys-filesystem (~> 1.5.0) tiny_appstore_connect (~> 0.1.12) diff --git a/config/solid_cache.yml b/config/cache.yml similarity index 100% rename from config/solid_cache.yml rename to config/cache.yml diff --git a/config/database.yml b/config/database.yml index 1405b812..ef64ece6 100644 --- a/config/database.yml +++ b/config/database.yml @@ -21,3 +21,8 @@ test: production: <<: *default + +cache: + <<: *default + database: cache + migrations_paths: db/cache_migrate diff --git a/db/cache_schema.rb b/db/cache_schema.rb new file mode 100644 index 00000000..6005a297 --- /dev/null +++ b/db/cache_schema.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 560b9f10..999a9e2f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_07_07_040749) do +ActiveRecord::Schema[7.2].define(version: 2024_07_07_040749) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql"