/**
  * @return mixed|null
  * @throws \InvalidArgumentException
  */
 public function commit()
 {
     /**
      * @eventName CacheCommitItem
      * @param $this ExtendedCacheItemPoolInterface
      * @param $deferredList ExtendedCacheItemInterface[]
      */
     $this->eventManager->dispatch('CacheCommitItem', $this, $this->deferredList);
     $return = null;
     foreach ($this->deferredList as $key => $item) {
         $result = $this->save($item);
         if ($return !== false) {
             unset($this->deferredList[$key]);
             $return = $result;
         }
     }
     return (bool) $return;
 }