Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #21908 [Cache] Fix Redis pipelining/multi-ops (nicolas-grekas)
This PR was merged into the 3.2 branch. Discussion ---------- [Cache] Fix Redis pipelining/multi-ops | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21858 | License | MIT | Doc PR | - `MSET` doesn't work on clustered connections. Let's use pipelining instead. Commits ------- f1648e2 [Cache] Fix Redis pipelining/multi-ops
- Loading branch information
Showing
2 changed files
with
81 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Symfony/Component/Cache/Tests/Adapter/PredisClusterAdapterTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Cache\Tests\Adapter; | ||
|
||
class PredisClusterAdapterTest extends AbstractRedisAdapterTest | ||
{ | ||
public static function setupBeforeClass() | ||
{ | ||
parent::setupBeforeClass(); | ||
self::$redis = new \Predis\Client(array(getenv('REDIS_HOST'))); | ||
} | ||
|
||
public static function tearDownAfterClass() | ||
{ | ||
self::$redis->getConnection()->getConnectionByKey('foo')->executeCommand(self::$redis->createCommand('FLUSHDB')); | ||
self::$redis = null; | ||
} | ||
} |