简体   繁体   中英

Twig does not update changes in 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?

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.

You should try to execute the command below in terminal, in your symfony project directory.

php bin/console cache:clear

Symfony documentation about that: https://symfony.com/doc/current/deployment.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM