Skip to content

Commit 3cd9685

Browse files
committed
Fixed an issue on Redis driver where deleteItem() erroneously return false sometimes.
1 parent c5b1eae commit 3cd9685

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Phpfastcache/Drivers/Redis/Driver.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ protected function driverDelete(ExtendedCacheItemInterface $item): bool
161161
{
162162
$this->assertCacheItemType($item, Item::class);
163163

164-
return (bool)$this->instance->del($item->getKey());
164+
$this->instance->del($item->getKey());
165+
166+
// Redis sometime returns erroneous results
167+
return true;
165168
}
166169

167170
/**

0 commit comments

Comments
 (0)