[Cache] Fixed Memcached adapter doClear()to call flush()

This commit is contained in:
Raito Akehanareru 2018-11-30 13:50:43 +01:00 committed by Nicolas Grekas
parent 317a2f9787
commit 447baacbad
2 changed files with 6 additions and 1 deletions

View File

@ -192,4 +192,9 @@ class MemcachedAdapterTest extends AdapterTestCase
array(\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8), array(\Memcached::OPT_SOCKET_RECV_SIZE => 1, \Memcached::OPT_SOCKET_SEND_SIZE => 2, \Memcached::OPT_RETRY_TIMEOUT => 8),
); );
} }
public function testClear()
{
$this->assertTrue($this->createCachePool()->clear());
}
} }

View File

@ -260,7 +260,7 @@ trait MemcachedTrait
*/ */
protected function doClear($namespace) protected function doClear($namespace)
{ {
return false; return '' === $namespace && $this->getClient()->flush();
} }
private function checkResultCode($result) private function checkResultCode($result)