Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/zendframework/zendframework#6871-memcache-return…
Browse files Browse the repository at this point in the history
…-false-on-failure-perf-improvement' into develop

Close zendframework/zendframework#6871
Forward port zendframework/zendframework#6871
  • Loading branch information
Ocramius committed Nov 14, 2014
3 parents a0b69e4 + 1c281f3 + d1768d6 commit 371ee3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Storage/Adapter/Memcached.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function internalGetItem(& $normalizedKey, & $success = null, & $casTo
}

$success = true;
if ($result === false || $result === null) {
if ($result === false) {
$rsCode = $memc->getResultCode();
if ($rsCode == MemcachedResource::RES_NOTFOUND) {
$result = null;
Expand Down Expand Up @@ -280,7 +280,7 @@ protected function internalHasItem(& $normalizedKey)
{
$memc = $this->getMemcachedResource();
$value = $memc->get($this->namespacePrefix . $normalizedKey);
if ($value === false || $value === null) {
if ($value === false) {
$rsCode = $memc->getResultCode();
if ($rsCode == MemcachedResource::RES_SUCCESS) {
return true;
Expand Down

0 comments on commit 371ee3b

Please sign in to comment.