/** * Возвращает значение кэша для плагина * * @param string $plugin Название плагина * @param \Phalcon\Http\Request $request Запрос * @return array|null */ public function get($plugin, Request $request) { if (!$this->useCache()) { return null; } $key = $this->getCacheKey($plugin, $request); return $this->cache->get($key); }
/** * Gets a session variable from an application context * * @param string $index * @param mixed $defaultValue * @return mixed */ public function get($index, $defaultValue = null) { if (!$this->is_started) { $this->start(); } $name = $this->getName($index); if (!isset($this->_data[$name])) { $this->_data[$name] = $this->cache->get($name); } return $this->_data[$name]; }
public static function get($key, $default = null) { static::$cache === null and static::$cache = static::$di->getShared('cache'); return null === ($value = static::$cache->get($key)) ? $default : $value; }