Skip to content

Commit

Permalink
Create ROUTING_CACHE_DIR contstant
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Mar 18, 2020
1 parent 513397c commit 4d2800d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/classes/Routing.php
Expand Up @@ -23,7 +23,7 @@ public static function getDispatcher(): Dispatcher

$routes = require ROOT_PATH . 'libraries/routes.php';
return cachedDispatcher($routes, [
'cacheFile' => ROOT_PATH . 'libraries/cache/routes.cache',
'cacheFile' => ROUTING_CACHE_DIR . 'routes.cache',
'cacheDisabled' => ($cfg['environment'] ?? '') === 'development',
]);
}
Expand Down
5 changes: 5 additions & 0 deletions libraries/vendor_config.php
Expand Up @@ -79,3 +79,8 @@
* is used)
*/
define('K_PATH_IMAGES', ROOT_PATH);

/**
* Define the cache directory for routing
*/
define('ROUTING_CACHE_DIR', ROOT_PATH . 'libraries/cache/');

0 comments on commit 4d2800d

Please sign in to comment.