Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fc7d5e

Browse files
Merge branch '3.4' into 4.1
* 3.4: [Cache] Fixed Memcached adapter doClear()to call flush()
2 parents db2c64d + 922e13c commit 5fc7d5e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Symfony/Component/Cache/Tests/Adapter/MemcachedAdapterTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,9 @@ public function provideDsnWithOptions()
192192
array(\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8),
193193
);
194194
}
195+
196+
public function testClear()
197+
{
198+
$this->assertTrue($this->createCachePool()->clear());
199+
}
195200
}

src/Symfony/Component/Cache/Traits/MemcachedTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ protected function doDelete(array $ids)
260260
*/
261261
protected function doClear($namespace)
262262
{
263-
return false;
263+
return '' === $namespace && $this->getClient()->flush();
264264
}
265265

266266
private function checkResultCode($result)

0 commit comments

Comments
 (0)