Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-solid_cache for 
openSUSE:Factory checked in at 2026-07-15 16:34:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-solid_cache (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-solid_cache.new.1991 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-solid_cache"

Wed Jul 15 16:34:09 2026 rev:2 rq:1365334 version:1.0.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-solid_cache/rubygem-solid_cache.changes  
2024-12-13 22:34:47.125182083 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-solid_cache.new.1991/rubygem-solid_cache.changes
        2026-07-15 16:51:37.666905781 +0200
@@ -1,0 +2,6 @@
+Mon Jul 13 11:14:54 UTC 2026 - Aleksei Burlakov <[email protected]>
+
+- New upstream release version 1.0.10:
+  * Revert "Generate reference to the database in the cache template for all 
envi…" 
+
+-------------------------------------------------------------------

Old:
----
  solid_cache-1.0.6.gem

New:
----
  solid_cache-1.0.10.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-solid_cache.spec ++++++
--- /var/tmp/diff_new_pack.86uzyp/_old  2026-07-15 16:51:39.318961913 +0200
+++ /var/tmp/diff_new_pack.86uzyp/_new  2026-07-15 16:51:39.322962049 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-solid_cache
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,13 +24,13 @@
 #
 
 Name:           rubygem-solid_cache
-Version:        1.0.6
+Version:        1.0.10
 Release:        0
 %define mod_name solid_cache
 %define mod_full_name %{mod_name}-%{version}
-BuildRequires:  ruby-macros >= 5
-BuildRequires:  %{ruby}
 BuildRequires:  %{rubygem gem2rpm}
+BuildRequires:  %{ruby}
+BuildRequires:  ruby-macros >= 5
 URL:            http://github.com/rails/solid_cache
 Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml

++++++ solid_cache-1.0.6.gem -> solid_cache-1.0.10.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2024-09-10 20:10:41.000000000 +0200
+++ new/README.md       1980-01-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 # Solid Cache
 
-Solid Cache is a database-backed Active Support cache store that let's you 
keep a much larger cache than is typically possible with traditional 
memory-only Redis or Memcached stores. This is thanks to the speed of modern 
SSD drives, which make the access-time penalty of using disk vs RAM 
insignificant for most caching purposes. Simply put, you're now usually better 
off keeping a huge cache on disk rather than a small cache in memory.
+Solid Cache is a database-backed Active Support cache store that lets you keep 
a much larger cache than is typically possible with traditional memory-only 
Redis or Memcached stores. This is thanks to the speed of modern SSD drives, 
which make the access-time penalty of using disk vs RAM insignificant for most 
caching purposes. Simply put, you're now usually better off keeping a huge 
cache on disk rather than a small cache in memory.
 
 ## Installation
 
@@ -9,9 +9,15 @@
 1. `bundle add solid_cache`
 2. `bin/rails solid_cache:install`
 
-This will configure Solid Cache as the production cache store, create 
`config/cache.yml`, and create `db/cache_schema.rb`.
+This will configure Solid Cache as the production cache store and create 
`config/cache.yml`.
 
-You will then have to add the configuration for the queue database in 
`config/database.yml`. If you're using sqlite, it'll look like this:
+If your application uses `config.active_record.schema_format = :ruby` (the 
default), the installer creates `db/cache_schema.rb`.
+
+If your application uses `config.active_record.schema_format = :sql`, the 
installer creates `db/cache_structure.sql` with the appropriate SQL for your 
database adapter (PostgreSQL, MySQL, or SQLite).
+
+### Configuring the cache database
+
+You will then have to add the configuration for the cache database in 
`config/database.yml`. If you're using sqlite, it'll look like this:
 
 ```yaml
 production:
@@ -39,7 +45,9 @@
     migrations_paths: db/cache_migrate
 ```
 
-Then run `db:prepare` in production to ensure the database is created and the 
schema is loaded.
+### Finalizing installation
+
+After configuring `database.yml`, run `db:prepare` in production to ensure the 
cache database is created and the schema is loaded.
 
 ## Configuration
 
@@ -55,7 +63,7 @@
   size_estimate_samples: 1000
 
 development: &development
-  database: development_cache
+  database: cache
   store_options:
     <<: *default_store_options
     max_size: <%= 256.gigabytes %>
@@ -64,28 +72,48 @@
   databases: [production_cache1, production_cache2]
   store_options:
     <<: *default_store_options
-    max_entries: <%= 256.gigabytes %>
+    max_size: <%= 256.gigabytes %>
 ```
 
 For the full list of keys for `store_options` see [Cache 
configuration](#cache-configuration). Any options passed to the cache lookup 
will overwrite those specified here.
 
+After running `solid_cache:install`, `environments/production.rb` will replace 
your cache store with Solid Cache, but you can also do this manually:
+
+```ruby
+# config/environments/production.rb
+config.cache_store = :solid_cache_store
+```
+
 ### Connection configuration
 
 You can set one of `database`, `databases` and `connects_to` in the config 
file. They will be used to configure the cache databases in 
`SolidCache::Record#connects_to`.
 
-Setting `database` to `cache_db` will configure with:
+If `connects_to` is set, it will be passed directly.
 
-```ruby
-SolidCache::Record.connects_to database: { writing: :cache_db }
-```
+Setting `database` is shorthand for connecting to a single database:
 
-Setting `databases` to `[cache_db, cache_db2]` is the equivalent of:
+```yaml
+database: :cache_db
 
-```ruby
-SolidCache::Record.connects_to shards: { cache_db1: { writing: :cache_db1 },  
cache_db2: { writing: :cache_db2 } }
+# equivalent to
+connects_to:
+  database:
+    writing: :cache_db
 ```
 
-If `connects_to` is set, it will be passed directly.
+And `databases` to `[cache_db, cache_db2]` configures multiple database shards:
+
+```yaml
+databases: [cache_db, cache_db2]
+
+# equivalent to
+connects_to:
+  shards:
+    cache_db1:
+      writing: :cache_db1
+    cache_db2:
+      writing: :cache_db2
+```
 
 If none of these are set, Solid Cache will use the `ActiveRecord::Base` 
connection pool. This means that cache reads and writes will be part of any 
wrapping database transaction.
 
@@ -189,7 +217,7 @@
 config.solid_cache.encrypt = true
 ```
 
-You will need to set up your application to (use Active Record 
Encryption)[https://guides.rubyonrails.org/active_record_encryption.html].
+You will need to set up your application to [use Active Record 
Encryption](https://guides.rubyonrails.org/active_record_encryption.html).
 
 Solid Cache by default uses a custom encryptor and message serializer that are 
optimised for it.
 
@@ -260,7 +288,7 @@
 
 ## Implementation
 
-Solid Cache is a FIFO (first in, first out) cache. While this is not as 
efficient as an LRU cache, it is mitigated by the longer cache lifespan.
+Solid Cache is a FIFO (first in, first out) cache. While this is not as 
efficient as an LRU (least recently used) cache, it is mitigated by the longer 
cache lifespan.
 
 A FIFO cache is much easier to manage:
 1. We don't need to track when items are read.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/app/models/solid_cache/entry.rb 
new/app/models/solid_cache/entry.rb
--- old/app/models/solid_cache/entry.rb 2024-09-10 20:10:41.000000000 +0200
+++ new/app/models/solid_cache/entry.rb 1980-01-02 01:00:00.000000000 +0100
@@ -14,6 +14,8 @@
 
     KEY_HASH_ID_RANGE = -(2**63)..(2**63 - 1)
 
+    MULTI_BATCH_SIZE = 1000
+
     class << self
       def write(key, value)
         write_multi([ { key: key, value: value } ])
@@ -21,9 +23,11 @@
 
       def write_multi(payloads)
         without_query_cache do
-          upsert_all \
-            add_key_hash_and_byte_size(payloads),
-            unique_by: upsert_unique_by, on_duplicate: :update, update_only: [ 
:key, :value, :byte_size ]
+          payloads.each_slice(MULTI_BATCH_SIZE).each do |payload_batch|
+            upsert_all \
+              add_key_hash_and_byte_size(payload_batch),
+              unique_by: upsert_unique_by, on_duplicate: :update, update_only: 
[ :key, :value, :byte_size ]
+          end
         end
       end
 
@@ -33,9 +37,15 @@
 
       def read_multi(keys)
         without_query_cache do
-          query = Arel.sql(select_sql(keys), *key_hashes_for(keys))
-
-          connection.select_all(query, "SolidCache::Entry 
Load").cast_values(attribute_types).to_h
+          {}.tap do |results|
+            keys.each_slice(MULTI_BATCH_SIZE).each do |keys_batch|
+              query = Arel.sql(select_sql(keys_batch), 
*key_hashes_for(keys_batch))
+
+              with_connection do |connection|
+                results.merge!(connection.select_all(query, "SolidCache::Entry 
Load").cast_values(attribute_types).to_h)
+              end
+            end
+          end
         end
       end
 
@@ -46,7 +56,9 @@
       end
 
       def clear_truncate
-        connection.truncate(table_name)
+        with_connection do |connection|
+          connection.truncate(table_name)
+        end
       end
 
       def clear_delete
@@ -83,7 +95,9 @@
         end
 
         def upsert_unique_by
-          connection.supports_insert_conflict_target? ? :key_hash : nil
+          with_connection do |connection|
+            connection.supports_insert_conflict_target? ? :key_hash : nil
+          end
         end
 
         # This constructs and caches a SQL query for a given number of keys.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/app/models/solid_cache/record.rb 
new/app/models/solid_cache/record.rb
--- old/app/models/solid_cache/record.rb        2024-09-10 20:10:41.000000000 
+0200
+++ new/app/models/solid_cache/record.rb        1980-01-02 01:00:00.000000000 
+0100
@@ -10,7 +10,22 @@
 
     class << self
       def disable_instrumentation(&block)
-        connection.with_instrumenter(NULL_INSTRUMENTER, &block)
+        with_instrumenter(NULL_INSTRUMENTER, &block)
+      end
+
+      def with_instrumenter(instrumenter, &block)
+        with_connection do |connection|
+          if connection.respond_to?(:with_instrumenter)
+            connection.with_instrumenter(instrumenter, &block)
+          else
+            begin
+              old_instrumenter, 
ActiveSupport::IsolatedExecutionState[:active_record_instrumenter] = 
ActiveSupport::IsolatedExecutionState[:active_record_instrumenter], instrumenter
+              block.call
+            ensure
+              
ActiveSupport::IsolatedExecutionState[:active_record_instrumenter] = 
old_instrumenter
+            end
+          end
+        end
       end
 
       def with_shard(shard, &block)
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/generators/solid_cache/install/install_generator.rb 
new/lib/generators/solid_cache/install/install_generator.rb
--- old/lib/generators/solid_cache/install/install_generator.rb 2024-09-10 
20:10:41.000000000 +0200
+++ new/lib/generators/solid_cache/install/install_generator.rb 1980-01-02 
01:00:00.000000000 +0100
@@ -5,11 +5,54 @@
 
   def copy_files
     template "config/cache.yml"
-    template "db/cache_schema.rb"
+
+    if Rails.application.config.active_record.schema_format == :sql
+      copy_sql_schema_for_adapter
+    else
+      template "db/cache_schema.rb"
+    end
   end
 
   def configure_cache_store_adapter
     gsub_file 
Pathname.new(destination_root).join("config/environments/production.rb"),
       /(# )?config\.cache_store = (:.*)/, "config.cache_store = 
:solid_cache_store"
   end
+
+  private
+    def copy_sql_schema_for_adapter
+      sql_file = sql_schema_file_for_adapter
+
+      if sql_file
+        copy_file sql_file, "db/cache_structure.sql"
+      else
+        raise_unsupported_adapter_error
+      end
+    end
+
+    def sql_schema_file_for_adapter
+      case ActiveRecord::Base.connection_db_config.adapter
+      when "postgresql"
+        "db/cache_structure.postgresql.sql"
+      when "mysql2", "trilogy"
+        "db/cache_structure.mysql.sql"
+      when "sqlite3"
+        "db/cache_structure.sqlite3.sql"
+      else
+        nil
+      end
+    end
+
+    def raise_unsupported_adapter_error
+      error_message = <<~ERROR
+
+        ERROR: Unsupported database adapter for SQL schema format: 
#{adapter.inspect}
+
+        SolidCache supports installing for the following Rails adapters with 
schema_format = :sql:
+          - PostgreSQL (postgresql)
+          - MySQL (mysql2, trilogy)
+          - SQLite (sqlite3)
+      ERROR
+
+      raise error_message
+    end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/generators/solid_cache/install/templates/db/cache_schema.rb 
new/lib/generators/solid_cache/install/templates/db/cache_schema.rb
--- old/lib/generators/solid_cache/install/templates/db/cache_schema.rb 
2024-09-10 20:10:41.000000000 +0200
+++ new/lib/generators/solid_cache/install/templates/db/cache_schema.rb 
1980-01-02 01:00:00.000000000 +0100
@@ -1,5 +1,3 @@
-# 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/generators/solid_cache/install/templates/db/cache_structure.mysql.sql 
new/lib/generators/solid_cache/install/templates/db/cache_structure.mysql.sql
--- 
old/lib/generators/solid_cache/install/templates/db/cache_structure.mysql.sql   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/lib/generators/solid_cache/install/templates/db/cache_structure.mysql.sql   
    1980-01-02 01:00:00.000000000 +0100
@@ -0,0 +1,56 @@
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, 
FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `ar_internal_metadata`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `ar_internal_metadata` (
+  `key` varchar(255) NOT NULL,
+  `value` varchar(255) DEFAULT NULL,
+  `created_at` datetime(6) NOT NULL,
+  `updated_at` datetime(6) NOT NULL,
+  PRIMARY KEY (`key`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+DROP TABLE IF EXISTS `schema_migrations`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `schema_migrations` (
+  `version` varchar(255) NOT NULL,
+  PRIMARY KEY (`version`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+DROP TABLE IF EXISTS `solid_cache_entries`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `solid_cache_entries` (
+  `id` bigint NOT NULL AUTO_INCREMENT,
+  `key` varbinary(1024) NOT NULL,
+  `value` longblob NOT NULL,
+  `created_at` datetime(6) NOT NULL,
+  `key_hash` bigint NOT NULL,
+  `byte_size` int NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `index_solid_cache_entries_on_key_hash` (`key_hash`),
+  KEY `index_solid_cache_entries_on_byte_size` (`byte_size`),
+  KEY `index_solid_cache_entries_on_key_hash_and_byte_size` 
(`key_hash`,`byte_size`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/generators/solid_cache/install/templates/db/cache_structure.postgresql.sql
 
new/lib/generators/solid_cache/install/templates/db/cache_structure.postgresql.sql
--- 
old/lib/generators/solid_cache/install/templates/db/cache_structure.postgresql.sql
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/lib/generators/solid_cache/install/templates/db/cache_structure.postgresql.sql
  1980-01-02 01:00:00.000000000 +0100
@@ -0,0 +1,128 @@
+SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_timeout = 0;
+SET transaction_timeout = 0;
+SET client_encoding = 'UTF8';
+SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
+SET check_function_bodies = false;
+SET xmloption = content;
+SET client_min_messages = warning;
+SET row_security = off;
+
+SET default_tablespace = '';
+
+SET default_table_access_method = heap;
+
+--
+-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.ar_internal_metadata (
+    key character varying NOT NULL,
+    value character varying,
+    created_at timestamp(6) without time zone NOT NULL,
+    updated_at timestamp(6) without time zone NOT NULL
+);
+
+
+--
+-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.schema_migrations (
+    version character varying NOT NULL
+);
+
+
+--
+-- Name: solid_cache_entries; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.solid_cache_entries (
+    id bigint NOT NULL,
+    key bytea NOT NULL,
+    value bytea NOT NULL,
+    created_at timestamp(6) without time zone NOT NULL,
+    key_hash bigint NOT NULL,
+    byte_size integer NOT NULL
+);
+
+
+--
+-- Name: solid_cache_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.solid_cache_entries_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: solid_cache_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; 
Owner: -
+--
+
+ALTER SEQUENCE public.solid_cache_entries_id_seq OWNED BY 
public.solid_cache_entries.id;
+
+
+--
+-- Name: solid_cache_entries id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.solid_cache_entries ALTER COLUMN id SET DEFAULT 
nextval('public.solid_cache_entries_id_seq'::regclass);
+
+
+--
+-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; 
Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.ar_internal_metadata
+    ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
+
+
+--
+-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: 
public; Owner: -
+--
+
+ALTER TABLE ONLY public.schema_migrations
+    ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
+
+
+--
+-- Name: solid_cache_entries solid_cache_entries_pkey; Type: CONSTRAINT; 
Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.solid_cache_entries
+    ADD CONSTRAINT solid_cache_entries_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: index_solid_cache_entries_on_byte_size; Type: INDEX; Schema: public; 
Owner: -
+--
+
+CREATE INDEX index_solid_cache_entries_on_byte_size ON 
public.solid_cache_entries USING btree (byte_size);
+
+
+--
+-- Name: index_solid_cache_entries_on_key_hash; Type: INDEX; Schema: public; 
Owner: -
+--
+
+CREATE UNIQUE INDEX index_solid_cache_entries_on_key_hash ON 
public.solid_cache_entries USING btree (key_hash);
+
+
+--
+-- Name: index_solid_cache_entries_on_key_hash_and_byte_size; Type: INDEX; 
Schema: public; Owner: -
+--
+
+CREATE INDEX index_solid_cache_entries_on_key_hash_and_byte_size ON 
public.solid_cache_entries USING btree (key_hash, byte_size);
+
+
+--
+-- PostgreSQL database dump complete
+--
+
+SET search_path TO "$user", public;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/lib/generators/solid_cache/install/templates/db/cache_structure.sqlite3.sql 
new/lib/generators/solid_cache/install/templates/db/cache_structure.sqlite3.sql
--- 
old/lib/generators/solid_cache/install/templates/db/cache_structure.sqlite3.sql 
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/lib/generators/solid_cache/install/templates/db/cache_structure.sqlite3.sql 
    1980-01-02 01:00:00.000000000 +0100
@@ -0,0 +1,6 @@
+CREATE TABLE IF NOT EXISTS "schema_migrations" ("version" varchar NOT NULL 
PRIMARY KEY);
+CREATE TABLE IF NOT EXISTS "ar_internal_metadata" ("key" varchar NOT NULL 
PRIMARY KEY, "value" varchar, "created_at" datetime(6) NOT NULL, "updated_at" 
datetime(6) NOT NULL);
+CREATE TABLE IF NOT EXISTS "solid_cache_entries" ("id" integer PRIMARY KEY 
AUTOINCREMENT NOT NULL, "key" blob(1024) NOT NULL, "value" blob(536870912) NOT 
NULL, "created_at" datetime(6) NOT NULL, "key_hash" integer(8) NOT NULL, 
"byte_size" integer(4) NOT NULL);
+CREATE INDEX "index_solid_cache_entries_on_byte_size" ON "solid_cache_entries" 
("byte_size");
+CREATE INDEX "index_solid_cache_entries_on_key_hash_and_byte_size" ON 
"solid_cache_entries" ("key_hash", "byte_size");
+CREATE UNIQUE INDEX "index_solid_cache_entries_on_key_hash" ON 
"solid_cache_entries" ("key_hash");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/solid_cache/configuration.rb 
new/lib/solid_cache/configuration.rb
--- old/lib/solid_cache/configuration.rb        2024-09-10 20:10:41.000000000 
+0200
+++ new/lib/solid_cache/configuration.rb        1980-01-02 01:00:00.000000000 
+0100
@@ -37,7 +37,7 @@
           when database
             { shards: { database.to_sym => { writing: database.to_sym } } }
           when databases
-            { shards: databases.map(&:to_sym).index_with { |database| { 
writing: database } } }
+            { shards: Array(databases).map(&:to_sym).index_with { |database| { 
writing: database } } }
           when connects_to
             connects_to
           else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/solid_cache/engine.rb 
new/lib/solid_cache/engine.rb
--- old/lib/solid_cache/engine.rb       2024-09-10 20:10:41.000000000 +0200
+++ new/lib/solid_cache/engine.rb       1980-01-02 01:00:00.000000000 +0100
@@ -41,7 +41,7 @@
     end
 
     config.after_initialize do
-      if SolidCache.configuration.encrypt? && Record.connection.adapter_name 
== "PostgreSQL" && Rails::VERSION::MAJOR <= 7
+      if SolidCache.configuration.encrypt? && 
Record.lease_connection.adapter_name == "PostgreSQL" && Rails::VERSION::MAJOR 
<= 7
         raise \
           "Cannot enable encryption for Solid Cache: in Rails 7, Active Record 
Encryption does not support " \
           "encrypting binary columns on PostgreSQL"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/solid_cache/store/connections.rb 
new/lib/solid_cache/store/connections.rb
--- old/lib/solid_cache/store/connections.rb    2024-09-10 20:10:41.000000000 
+0200
+++ new/lib/solid_cache/store/connections.rb    1980-01-02 01:00:00.000000000 
+0100
@@ -34,26 +34,6 @@
         end
       end
 
-      def with_connection_for(key, async: false, &block)
-        connections.with_connection_for(key) do
-          execute(async, &block)
-        end
-      end
-
-      def with_connection(name, async: false, &block)
-        connections.with(name) do
-          execute(async, &block)
-        end
-      end
-
-      def group_by_connection(keys)
-        connections.assign(keys)
-      end
-
-      def connection_names
-        connections.names
-      end
-
       def connections
         @connections ||= SolidCache::Connections.from_config(@shard_options)
       end
@@ -63,6 +43,26 @@
           connections
         end
 
+        def with_connection_for(key, async: false, &block)
+          connections.with_connection_for(key) do
+            execute(async, &block)
+          end
+        end
+
+        def with_connection(name, async: false, &block)
+          connections.with(name) do
+            execute(async, &block)
+          end
+        end
+
+        def group_by_connection(keys)
+          connections.assign(keys)
+        end
+
+        def connection_names
+          connections.names
+        end
+
         def reading_key(key, failsafe:, failsafe_returning: nil, &block)
           failsafe(failsafe, returning: failsafe_returning) do
             with_connection_for(key, &block)
@@ -70,16 +70,15 @@
         end
 
         def reading_keys(keys, failsafe:, failsafe_returning: nil)
-          group_by_connection(keys).map do |connection, keys|
+          group_by_connection(keys).map do |connection, grouped_keys|
             failsafe(failsafe, returning: failsafe_returning) do
               with_connection(connection) do
-                yield keys
+                yield grouped_keys
               end
             end
           end
         end
 
-
         def writing_key(key, failsafe:, failsafe_returning: nil, &block)
           failsafe(failsafe, returning: failsafe_returning) do
             with_connection_for(key, &block)
@@ -87,10 +86,10 @@
         end
 
         def writing_keys(entries, failsafe:, failsafe_returning: nil)
-          group_by_connection(entries).map do |connection, entries|
+          group_by_connection(entries).map do |connection, grouped_entries|
             failsafe(failsafe, returning: failsafe_returning) do
               with_connection(connection) do
-                yield entries
+                yield grouped_entries
               end
             end
           end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/solid_cache/store/expiry.rb 
new/lib/solid_cache/store/expiry.rb
--- old/lib/solid_cache/store/expiry.rb 2024-09-10 20:10:41.000000000 +0200
+++ new/lib/solid_cache/store/expiry.rb 1980-01-02 01:00:00.000000000 +0100
@@ -1,7 +1,5 @@
 # frozen_string_literal: true
 
-require "concurrent/atomic/atomic_fixnum"
-
 module SolidCache
   class Store
     module Expiry
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/solid_cache/store/failsafe.rb 
new/lib/solid_cache/store/failsafe.rb
--- old/lib/solid_cache/store/failsafe.rb       2024-09-10 20:10:41.000000000 
+0200
+++ new/lib/solid_cache/store/failsafe.rb       1980-01-02 01:00:00.000000000 
+0100
@@ -6,7 +6,6 @@
       TRANSIENT_ACTIVE_RECORD_ERRORS = [
         ActiveRecord::AdapterTimeout,
         ActiveRecord::ConnectionNotEstablished,
-        ActiveRecord::ConnectionTimeoutError,
         ActiveRecord::Deadlocked,
         ActiveRecord::LockWaitTimeout,
         ActiveRecord::QueryCanceled,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/solid_cache/version.rb 
new/lib/solid_cache/version.rb
--- old/lib/solid_cache/version.rb      2024-09-10 20:10:41.000000000 +0200
+++ new/lib/solid_cache/version.rb      1980-01-02 01:00:00.000000000 +0100
@@ -1,5 +1,5 @@
 # frozen_string_literal: true
 
 module SolidCache
-  VERSION = "1.0.6"
+  VERSION = "1.0.10"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2024-09-10 20:10:41.000000000 +0200
+++ new/metadata        1980-01-02 01:00:00.000000000 +0100
@@ -1,14 +1,13 @@
 --- !ruby/object:Gem::Specification
 name: solid_cache
 version: !ruby/object:Gem::Version
-  version: 1.0.6
+  version: 1.0.10
 platform: ruby
 authors:
 - Donal McBreen
-autorequire:
 bindir: bin
 cert_chain: []
-date: 2024-09-10 00:00:00.000000000 Z
+date: 1980-01-02 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activerecord
@@ -117,6 +116,9 @@
 - lib/generators/solid_cache/install/install_generator.rb
 - lib/generators/solid_cache/install/templates/config/cache.yml.tt
 - lib/generators/solid_cache/install/templates/db/cache_schema.rb
+- lib/generators/solid_cache/install/templates/db/cache_structure.mysql.sql
+- 
lib/generators/solid_cache/install/templates/db/cache_structure.postgresql.sql
+- lib/generators/solid_cache/install/templates/db/cache_structure.sqlite3.sql
 - lib/solid_cache.rb
 - lib/solid_cache/configuration.rb
 - lib/solid_cache/connections.rb
@@ -141,9 +143,6 @@
 metadata:
   homepage_uri: http://github.com/rails/solid_cache
   source_code_uri: http://github.com/rails/solid_cache
-post_install_message: |
-  Upgrading from Solid Cache v0.3 or earlier? There are new database 
migrations in v0.4.
-  See 
https://github.com/rails/solid_cache/blob/main/upgrading_to_version_0.4.x.md 
for upgrade instructions.
 rdoc_options: []
 require_paths:
 - lib
@@ -158,8 +157,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.5.11
-signing_key:
+rubygems_version: 3.6.9
 specification_version: 4
 summary: A database backed ActiveSupport::Cache::Store
 test_files: []

Reply via email to