/** * @param $method string the methode name of the parent method * @param $args array the method parameters * @return mixed */ protected function _cachedOrFromParent($method, $args) { $cacheKey = $this->getCacheKey([get_called_class() . '::' . $method, serialize($args)]); if ($this->_cache->has($cacheKey)) { $ret = $this->_cache->get($cacheKey); } else { $ret = call_user_func_array(array('parent', $method), $args); $this->_cache->forever($cacheKey, $ret); } return $ret; }
/** * Store an item in the cache indefinitely. * * @param mixed $key * @param mixed $value * @return void */ public function forever($key, $value) { if (is_array($key) && is_array($value)) { $this->foreverMany(array_combine($key, $value)); } else { parent::forever($key, $value); } }
/** * Store an item in the cache indefinitely. * * @param string $key * @param mixed $value * @return void */ public function forever($key, $value) { $this->sendTagsToStore(); parent::forever($key, $value); }