Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #27416 TagAwareAdapter over non-binary memcached connections corr…
…upts memcache (Aleksey Prilipko) This PR was merged into the 3.4 branch. Discussion ---------- TagAwareAdapter over non-binary memcached connections corrupts memcache | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #27405 | License | MIT | Doc PR | TagAwareAdapter uses non-ascii symbols in key names. It breaks memcached connections in non-binary mode. Commits ------- 67d4e6d bug #27405 [Cache] TagAwareAdapter should not corrupt memcached connection in ascii mode
- Loading branch information
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/Symfony/Component/Cache/Tests/Simple/MemcachedCacheTextModeTest.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,25 @@ | ||
<?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\Simple; | ||
|
||
use Symfony\Component\Cache\Adapter\AbstractAdapter; | ||
use Symfony\Component\Cache\Simple\MemcachedCache; | ||
|
||
class MemcachedCacheTextModeTest extends MemcachedCacheTest | ||
{ | ||
public function createSimpleCache($defaultLifetime = 0) | ||
{ | ||
$client = AbstractAdapter::createConnection('memcached://'.getenv('MEMCACHED_HOST'), array('binary_protocol' => false)); | ||
|
||
return new MemcachedCache($client, str_replace('\\', '.', __CLASS__), $defaultLifetime); | ||
} | ||
} |
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