Last updated April 26, 2013. Created by alexrayu on January 30, 2013.
Edited by randomblink, Cottser, Fabianx. Log in to edit this page.
The Twig theming engine compiles templates into PHP code. By default, the compiled code is stored in RAM, and is not easy to debug.
To make the Twig theming engine save templates in the file system, edit file core/lib/Drupal/Core/CoreBundle.php. Set cache => TRUE in function registerTwig();
This is the default option.
Twig debugging configuration may still change, as per #1843034: Make Twig settings configurable
Currently, Twig cache can only be cleared through Drupal's clear cache interface and it does not respond to changes in a Twig template. This means that if you have set cache set to TRUE until the above issue is in you will need to clear the cache for each template change in order for Drupal to regenerate the template.