8000 Merge branch '3.4' into 4.1 · symfony/cache@b3987f2 · GitHub
[go: up one dir, main page]

Skip to content

Commit b3987f2

Browse files
Merge branch '3.4' into 4.1
* 3.4: [Cache] Fixed Memcached adapter doClear()to call flush()
2 parents edd24c3 + d31c2a1 commit b3987f2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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
}

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)
0