/** * Replace an existing item. * * @param string $key * @param mixed $value * @return bool * @throws Exception\ExceptionInterface * * @triggers replaceItem.pre(PreEvent) * @triggers replaceItem.post(PostEvent) * @triggers replaceItem.exception(ExceptionEvent) */ public function replaceItem($key, $value) { $options = $this->getOptions(); if ($options->getWritable() && $options->getClearStatCache()) { clearstatcache(); } return parent::replaceItem($key, $value); }
/** * Replace an existing item. * * Options: * - namespace <string> optional * - The namespace to use (Default: namespace of object) * - tags <array> optional * - An array of tags * * @param string $key * @param mixed $value * @param array $options * @return boolean * @throws Exception\ExceptionInterface * * @triggers replaceItem.pre(PreEvent) * @triggers replaceItem.post(PostEvent) * @triggers replaceItem.exception(ExceptionEvent) */ public function replaceItem($key, $value, array $options = array()) { $baseOptions = $this->getOptions(); if ($baseOptions->getWritable() && $baseOptions->getClearStatCache()) { clearstatcache(); } return parent::replaceItem($key, $value, $options); }