Skip to content

Commit

Permalink
Merge pull request #150 from BVMiko/patch-1
Browse files Browse the repository at this point in the history
Fix for PSR-6 compliance to verify a hit
  • Loading branch information
bshaffer authored Jun 12, 2017
2 parents 33bc708 + fd0a556 commit 2b11246
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CacheTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ private function getCachedValue($k)
}

$cacheItem = $this->cache->getItem($key);
return $cacheItem->get();
if ($cacheItem->isHit()) {
return $cacheItem->get();
}
}

/**
Expand Down

0 comments on commit 2b11246

Please sign in to comment.