private function finalizeItem(CacheItemInterface $item) { if ($item instanceof ItemDecorator) { return $item->finalize(); } throw new InvalidArgumentException('The provided cache item cannot' . ' be saved, as it did not originate from this cache.'); }