write([$item]); } /** * {@inheritdoc} */ public function saveDeferred(CacheItemInterface $item) { $this->deferred[] = $item; return true; } /** * {@inheritdoc} */ public function commit() { $success = $this->write($this->deferred); if ($success) { $this->deferred = []; } return $success; } /** * Commits the specified cache items to storage. * * @param CacheItemInterface[] $items * * @return bool * TRUE if all provided items were successfully saved. FALSE otherwise. */ abstract protected function write(array $items); }