From 6711385a46440b1a0e3bde2c257cee7cf21fea4b Mon Sep 17 00:00:00 2001 From: Michel Tomas Date: Wed, 21 May 2025 23:40:10 +0200 Subject: [PATCH] fix(cache/redis): use connectionAwareSerialize in RedisStore::putMany() Cache RedisStore::putMany() should not serialize values if the connection already uses serialization. --- src/Illuminate/Cache/RedisStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Cache/RedisStore.php b/src/Illuminate/Cache/RedisStore.php index 33cdf87307c7..399f4ac78ea0 100755 --- a/src/Illuminate/Cache/RedisStore.php +++ b/src/Illuminate/Cache/RedisStore.php @@ -140,7 +140,7 @@ public function putMany(array $values, $seconds) $serializedValues = []; foreach ($values as $key => $value) { - $serializedValues[$this->prefix.$key] = $this->serialize($value); + $serializedValues[$this->prefix.$key] = $this->connectionAwareSerialize($value, $connection); } $connection->multi();