Skip to content

Commit

Permalink
[Cache] Fixed Memcached adapter doClear()to call flush()
Browse files Browse the repository at this point in the history
  • Loading branch information
raitocz authored and nicolas-grekas committed Dec 6, 2018
1 parent 317a2f9 commit 447baac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -192,4 +192,9 @@ public function provideDsnWithOptions()
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());
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Component/Cache/Traits/MemcachedTrait.php
Expand Up @@ -260,7 +260,7 @@ protected function doDelete(array $ids)
*/
protected function doClear($namespace)
{
return false;
return '' === $namespace && $this->getClient()->flush();
}

private function checkResultCode($result)
Expand Down

0 comments on commit 447baac

Please sign in to comment.