Skip to content

Commit 2ccfd65

Browse files
committed
Bugfixes
1 parent 12973ec commit 2ccfd65

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/MemcachedCachePool.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ protected function clearAllObjectsFromCache()
5353

5454
protected function clearOneObjectFromCache($key)
5555
{
56-
return $this->cache->delete($key);
56+
if ($this->cache->delete($key)) {
57+
return true;
58+
}
59+
60+
// Return true if key not found
61+
return $this->cache->getResultCode() === \Memcached::RES_NOTFOUND;
5762
}
5863

5964
protected function storeItemInCache($key, CacheItemInterface $item, $ttl)

tests/IntegrationPoolTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ private function getClient()
2828
{
2929
if ($this->client === null) {
3030
$this->client = new \Memcached();
31+
$this->client->addServer('localhost', 11211);
3132
}
3233

3334
return $this->client;

tests/IntegrationTagTest.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ private function getClient()
2828
{
2929
if ($this->client === null) {
3030
$this->client = new \Memcached();
31+
$this->client->addServer('localhost', 11211);
3132
}
3233

3334
return $this->client;

0 commit comments

Comments
 (0)