diff --git a/Route.php b/Route.php index 755888f..8a46431 100644 --- a/Route.php +++ b/Route.php @@ -143,9 +143,7 @@ public static function validate(string $method, string $pattern, $routes) return true; }; - $result = $callback($collector); - - return $result; + return $callback($collector); } /** diff --git a/Routes.php b/Routes.php index 03b336a..aaafd20 100644 --- a/Routes.php +++ b/Routes.php @@ -21,13 +21,6 @@ */ class Routes implements RoutesInterface { - /** - * Cache save time - * - * @var integer - */ - public static $cacheSaveTime = 4; - /** * Routes storage adapter * @@ -430,7 +423,7 @@ public function getAllRoutes() $routes = $this->cache->fetch('routes.list'); if ($routes === false) { $routes = $this->getRoutes(['status' => 1]); - $this->cache->save('routes.list',$routes,Self::$cacheSaveTime); + $this->cache->save('routes.list',$routes); } return $routes; @@ -449,7 +442,7 @@ public function searchRoutes(string $method, $type = null): array $routes = $this->cache->fetch($cacheItemkey); if ($routes === false) { $routes = $this->adapter->searchRoutes($method,$type); - $this->cache->save($cacheItemkey,$routes,Self::$cacheSaveTime); + $this->cache->save($cacheItemkey,$routes); } return $routes;