DbRoutingBundle icon indicating copy to clipboard operation
DbRoutingBundle copied to clipboard

Caching

Open arnogeurts opened this issue 13 years ago • 2 comments

As you know, Symfony2 caches all routes in a php file. A database routing bundle implies that the routes are very dynamic, but when i change a route in the database the cache was not cleared, so the route was not available right after i added it.

arnogeurts avatar Mar 29 '12 11:03 arnogeurts

@arnogeurts hi. have you solved this problem?

Sergic avatar Aug 22 '12 22:08 Sergic

I have founded solution, but you will not like it :)

problem is becase symfony2 generate routing cache in app/cache/prod/appprodUrlMatcher.php (check it and you will got problem)

I have application with crazy dynamic routes and I simply added

unlink "../app/cache/prod/appprodUrlMatcher.php";
unlink "../app/cache/prod/appprodUrlGenerator.php";
in my app.php.

It would be in my personal top10 of the ugly solutions list, but... I really need it work in such a way and cant find how I can disable routing cache :)

Search tags for google: symfony2 disable router cache routing, disable appprodUrlMatcher.php generation, dynamic routes, dynamic routing, dynamically generated routes :)

zhil avatar Dec 14 '12 17:12 zhil