Skip to content

Commit 5c2787f

Browse files
committed
Bugfix, make sure to check deferred
1 parent 8bd4354 commit 5c2787f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
{
3030
"php": "^5.5|^7.0",
3131
"psr/cache": "1.0.0",
32-
"cache/adapter-common": "^0.1",
32+
"cache/adapter-common": "^0.1.2",
3333
"cache/taggable-cache": "^0.2",
3434
"predis/predis": "^1.0"
3535
},

src/RedisCachePool.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public function hasItem($key, array $tags = [])
4242
$this->validateKey($key);
4343
$taggedKey = $this->generateCacheKey($key, $tags);
4444

45+
if (isset($this->deferred[$key])) {
46+
return true;
47+
}
48+
4549
return $this->cache->exists($taggedKey);
4650
}
4751

0 commit comments

Comments
 (0)