tighten / ziggy

Use your Laravel routes in JavaScript.
MIT License
3.83k stars 247 forks source link

file cache route creation Ziggy.php #710

Open msoler75 opened 6 months ago

msoler75 commented 6 months ago

file cache creation of data for optimum performance.

In my localhost, with a laravel project with ~300 routes, I reduce time about 10 to 56 ms

bakerkretzmar commented 6 months ago

Not totally convinced that this is necessary, but open to it if the performance gains are significant. I'm surprised that reading from the file and calling collect() is faster than doing it in memory.

Can you add tests for this and update your code comments to be in English? Also, is this tied to the route cache at all? How does it get cleared/updated when routes change?

Thanks!