FOSJsRoutingBundle icon indicating copy to clipboard operation
FOSJsRoutingBundle copied to clipboard

Implement WarmableInterface

Open bpolaszek opened this issue 6 years ago • 0 comments

Hey there,

I just figured out that calling the fos_js_routing_js will trigger a cache write in the %kernel.project_dir%/var/cache/%kernel.environment%/fosJsRouting directory (which doesn't exist in case of a cache miss).

This has 2 drawbacks:

Why not implementing a Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface service which would hook on the cache:clear and the cache:warmup commands to write everything needed during deployment and/or cache clear/warmup?

Pre-requisites are prior knowledge of all the locales used but this can be achieved through the bundle configuration.

What are your thoughts?

bpolaszek avatar Jul 08 '19 09:07 bpolaszek