From 80929808922a791c5ef2240e44557ce85fb95b90 Mon Sep 17 00:00:00 2001 From: Geolim4 Date: Sat, 21 Jul 2018 17:53:41 +0200 Subject: [PATCH] Described clear() abstract method --- lib/Phpfastcache/Core/Pool/CacheItemPoolTrait.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();