@@ -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 |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | // Usa pipeline solo se non è un cluster |
| 94 | 94 | $isCluster = config('database.redis.clusters.' . ($connection_name ?? 'default')) !== null; |
| 95 | 95 | if (!$isCluster) { |
| 96 | - $this->redis->pipeline(function ($pipe) use ($finalKey, $finalTags, $value, $tags, $ttl) { |
|
| 96 | + $this->redis->pipeline(function($pipe) use ($finalKey, $finalTags, $value, $tags, $ttl) { |
|
| 97 | 97 | // Qui devo mettere le {} perchè così mi assicuro che la chiave e i suoi tags stiano nello stesso has |
| 98 | 98 | if ($ttl !== null) { |
| 99 | 99 | $pipe->setEx('{' . $finalKey . '}', $ttl, $this->serializeForRedis($value)); |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $tags = $this->redis->getRedisConnection($connection_name)->smembers($finalTags); |
| 184 | 184 | $isCluster = config('database.redis.clusters.' . ($connection_name ?? 'default')) !== null; |
| 185 | 185 | if (!$isCluster) { |
| 186 | - $this->redis->pipeline(function ($pipe) use ($isWithTags, $onlyTags, $tags, $finalKey, $finalTags) { |
|
| 186 | + $this->redis->pipeline(function($pipe) use ($isWithTags, $onlyTags, $tags, $finalKey, $finalTags) { |
|
| 187 | 187 | foreach ($tags as $tag) { |
| 188 | 188 | $shard = $this->getShardNameForTag($tag, '{' . $finalKey . '}'); |
| 189 | 189 | $pipe->srem($shard, '{' . $finalKey . '}'); |