Example #1
0
 /**
  * Saves or loads the route cache.
  *
  * @param   boolean   cache the current routes
  * @return  void      when saving routes
  * @return  boolean   when loading routes
  */
 public static function cache($save = FALSE)
 {
     if ($save === TRUE) {
         Ko::cache('Route::cache()', Route::$routes);
     } else {
         if ($routes = Ko::cache('Route::cache()')) {
             Route::$routes = $routes;
             return TRUE;
         } else {
             return FALSE;
         }
     }
 }