@@ -198,7 +198,7 @@ |
||
198 | 198 | $async_connection = $this->redis->getNativeRedisConnection($this->option('connection_name'), $this->option('host'), $this->option('port')); |
199 | 199 | $pattern = '__keyevent@' . $async_connection['database'] . '__:expired'; |
200 | 200 | // La psubscribe è BLOCCANTE, il command resta attivo finchè non cade la connessione |
201 | - $async_connection['connection']->psubscribe([$pattern], function ($redis, $channel, $message, $key) { |
|
201 | + $async_connection['connection']->psubscribe([$pattern], function($redis, $channel, $message, $key) { |
|
202 | 202 | $this->onExpireEvent($key); |
203 | 203 | |
204 | 204 | // Verifica se è necessario processare il batch |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | // Usa pipeline solo se non è un cluster |
86 | 86 | $isCluster = config('database.redis.clusters.' . ($connection_name ?? 'default')) !== null; |
87 | 87 | if (!$isCluster) { |
88 | - $this->redis->pipeline(function ($pipe) use ($finalKey, $value, $tags, $ttl) { |
|
88 | + $this->redis->pipeline(function($pipe) use ($finalKey, $value, $tags, $ttl) { |
|
89 | 89 | // Qui devo mettere le {} perchè così mi assicuro che la chiave e i suoi tags stiano nello stesso has |
90 | 90 | if ($ttl !== null) { |
91 | 91 | $pipe->setEx($finalKey, $ttl, $this->serializeForRedis($value)); |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $tags = $this->redis->getRedisConnection($connection_name)->smembers($this->prefix . 'tags:' . $finalKey); |
175 | 175 | $isCluster = config('database.redis.clusters.' . ($connection_name ?? 'default')) !== null; |
176 | 176 | if (!$isCluster) { |
177 | - $this->redis->pipeline(function ($pipe) use ($tags, $finalKey) { |
|
177 | + $this->redis->pipeline(function($pipe) use ($tags, $finalKey) { |
|
178 | 178 | foreach ($tags as $tag) { |
179 | 179 | $shard = $this->getShardNameForTag($tag, $finalKey); |
180 | 180 | $pipe->srem($shard, $finalKey); |