/** * Load routes from cache * * @return null */ protected function loadCache() { if ($this->cached !== null) { return null; } $this->cached = false; if ($this->productionMode) { $routes = $this->cache->get('routes'); if (isset($routes) && is_array($routes)) { $this->routes = $routes; $this->cached = true; } } }
/** * Store the url map cache if needed */ protected function saveRoutesToCache() { if ($this->productionMode && !$this->cached && $this->enableRouteCache) { $this->cache->set('routes', Routes::toArray() + array('apiVersionMap' => $this->apiVersionMap)); } }
/** * Store the url map cache if needed */ public function __destruct() { if ($this->productionMode && !$this->cached) { $this->cache->set('routes', Routes::toArray() + array('apiVersionMap' => $this->apiVersionMap)); } }
/** * Store the url map cache if needed */ public function __destruct() { if ($this->productionMode && !$this->cached) { $this->cache->set('routes', Routes::toArray()); } }