diff --git a/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php b/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php index 71df23e82..40f580d02 100644 --- a/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php +++ b/lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php @@ -240,11 +240,12 @@ public function clear() /** * @eventName CacheClearItem * @param $this ExtendedCacheItemPoolInterface - * @param $deferredList ExtendedCacheItemInterface[] + * @param $itemInstances ExtendedCacheItemInterface[] */ $this->eventManager->dispatch('CacheClearItem', $this, $this->itemInstances); CacheManager::$WriteHits++; + // Faster than detachAllItems() $this->itemInstances = []; return $this->driverClear();