Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #28269 [Cache] improve perf when using RedisCluster by reducing…
… roundtrips to the servers (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Improves perf when using RedisCluster by: - disabling versioning and replacing by per-master clear/flush - grouping multiple "get" in one "mget" - enabling pipelining in PredisCluster mode ~Might need adjustment depending on the answer to predis/predis#520 Commits ------- 5155f48 [Cache] improve perf when using RedisCluster by reducing roundtrips to the servers
- Loading branch information
Showing
2 changed files
with
74 additions
and
28 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
src/Symfony/Component/Cache/Tests/Adapter/PredisRedisClusterAdapterTest.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,28 @@ | ||
<?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 PredisRedisClusterAdapterTest extends AbstractRedisAdapterTest | ||
{ | ||
public static function setupBeforeClass() | ||
{ | ||
if (!$hosts = getenv('REDIS_CLUSTER_HOSTS')) { | ||
self::markTestSkipped('REDIS_CLUSTER_HOSTS env var is not defined.'); | ||
} | ||
self::$redis = new \Predis\Client(explode(' ', $hosts), array('cluster' => 'redis')); | ||
} | ||
|
||
public static function tearDownAfterClass() | ||
{ | ||
self::$redis = null; | ||
} | ||
} |
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