Prado\Web\THttpRequest::cacheUrlManager PHP 메소드

cacheUrlManager() 보호된 메소드

Saves the current UrlManager instance to cache.
protected cacheUrlManager ( $manager ) : boolean
리턴 boolean true if UrlManager instance was cached, false otherwise.
    protected function cacheUrlManager($manager)
    {
        if ($this->getEnableCache()) {
            $cache = $this->getApplication()->getCache();
            if ($cache !== null) {
                $dependencies = null;
                if ($this->getApplication()->getMode() !== TApplicationMode::Performance) {
                    if ($manager instanceof TUrlMapping && ($fn = $manager->getConfigFile())) {
                        $fn = Prado::getPathOfNamespace($fn, $this->getApplication()->getConfigurationFileExt());
                        $dependencies = new TFileCacheDependency($fn);
                    }
                }
                return $cache->set($this->getCacheKey(), $manager, 0, $dependencies);
            }
        }
        return false;
    }