Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twig does not update changes in symfony

Tags:

php

twig

symfony

I am working with Symfony 2.8 in developer mode and Windows 10. When I update template Twig, always I have to clear cache to update render. I looked permissions for folders cache and logs and I have the necessary permissions.

Any help?

like image 598
Sergio Carrillo Avatar asked Feb 26 '16 10:02

Sergio Carrillo


Video Answer


1 Answers

Go to app config file (by defualt will be located in ../app/config/config.yml from your root directory). Scroll to the twig configuration settings (under twig:) and change the cache value (which should be pointing to the cache directory) to false like so:

twig:
    cache:  false

If you do not see any cache configuration entry, simply add the line above.

Or you can disable the twig cache on web/app_dev.php only for avoid any problem when you're going to push your code in prod environnement.

like image 174
Antoine Subit Avatar answered Oct 21 '22 17:10

Antoine Subit