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