2023/07/27分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Active Support cache stores now support replacing the default compressor via a
:compressoroption. The specified compressor must respond todeflateandinflate. - Active Support cache stores now support a
:serializeroption. Similar to the:coderoption, serializers must respond todumpandload. However, serializers are only responsible for serializing a cached value, whereas coders are responsible for serializing the entireActiveSupport::Cache::Entryinstance. - Make all cache stores return a boolean for
#delete
Support replacing cache compressor
Active Supportの修正です。
cache storeで使用するcompressorに任意のクラスを使用出来るよう修正しています。 compressor用のクラスはdeflateとinflateメソッドを実装する必要があり、:compressor オプションにそのクラスを指定する事で使用出来るようになっています。
module MyCompressor def self.deflate(string) compression logic... end def self.inflate(compressed) # decompression logic... end end config.cache_store = :redis_cache_store, { compressor: MyCompressor }
合わせて、cache storeで使用するserializerを:serializerオプションで指定出来るよう修正しています。こちらはdumpとloadメソッドが実装されている必要があります。
Added test for --no-skip-docker command line argument
railties/test/generators/app_generator_test.rbの修正です。
rails newに--no-skip-dockerオプションを指定した場合のテストを追加しています。
Merge pull request #48817 from Shopify/return-false-early-if-non-AR-value-passed-in-include
activerecord/lib/active_record/relation/finder_methods.rbの修正です。
FinderMethods#include?にActive Recordのobjectではない不正な値が指定された場合にNoMethodErrorが発生してしまうバグがあったのを修正しています。
Make all cache stores return a boolean for #delete
Active Supportの修正です。
cache storeによって#deleteの戻り値が異なっていた(例えばredis cache storeは0/1を返していたが、fire storeはnil/falseを返していた)のを、delete対象のkeyが見つかった場合はtrueを、そうでない場合はfalseを返すよう全てのstoreで挙動を統一するよう修正しています。
Fix a rebase mistake in activesupport/CHANGELOG
activesupport/CHANGELOG.mdの修正です。
rebaseミスによりエントリーの対応者が消えてしまっていたのを修正しています。
Remove an extra whitespace in activesupport/CHANGELOG
activesupport/CHANGELOG.mdの修正です。
不要な空白を削除しています。
Sort SchemaCache members when dumping it
activerecord/lib/active_record/connection_adapters/schema_cache.rbの修正です。
SchemaCacheでcolumnsやprimary_keysを出力する際に値をsortしてから出力するよう修正しています。出力結果が毎回同じになるようにする為。