One of Symfony's strengths is its caching mechanism (the files stored in "var/cache"), which enables framework components such as the dependency injection container and the router, as well as numerous bundles, to be ultra-fast in production.
However, during development, regeneration of this cache can cause slowness and make the work of programmers tedious. Each time a PHP file, configuration file or Twig template is modified, all or part of the cache must be regenerated.
The latest version of FrankenPHP contains a new feature which, coupled with worker mode, can change all that: watchers.
After presenting how Symfony's caching mechanism works, and how to take advantage of it in our applications and bundles, we'll discover how to use watchers and FrankenPHP's worker mode to ensure that changes made to our code are reflected almost instantaneously in our browser, and thus avoid the frustration of long loading times in dev.