Пример #1
0
 /**
  * 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;
         }
     }
 }
Пример #2
0
 /**
  * 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));
     }
 }
Пример #3
0
 /**
  * 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));
     }
 }
Пример #4
0
 /**
  * Store the url map cache if needed
  */
 public function __destruct()
 {
     if ($this->productionMode && !$this->cached) {
         $this->cache->set('routes', Routes::toArray());
     }
 }