DEV Community

Discussion on: Real life comparison of Symfony router and Mezon router

Collapse
 
alexdodonov profile image
alexdodonov

Mmmmmmm I have not dig so deep, but I shall change the benchmark.

reuse the already dumped routes in the loop.

Just include cache.php in my php script? or there is a method wich loads cached routes?

Collapse
 
nicolasgrekas profile image
Nicolas Grekas

you can dump cache.php doing eg:
file_put_contents('cache.php', '<?php return '.var_export($dumper->getCompiledRoutes(), true).';');

then to get the compiled routes:
$compiledRoutes = require 'cache.php';