Duck of Death
Duck of Death

Reputation: 17

Symfony/twig turn off cache

I've currently come into a job that uses Symfony2 and it's simple enough, but I've never used Symfony and I cannot find out how to turn off twig template caching. I need to make changes to the view as I go along and this is preventing me from doing so. In my config.yaml file I have the following entry for twig:

twig:
debug:            "%kernel.debug%"
strict_variables: "%kernel.debug%"

Is there a simple way to do this?

Upvotes: 1

Views: 684

Answers (1)

René Höhle
René Höhle

Reputation: 27295

You have to switch to the dev environment where the caching is disabled. Open your controller with app_dev.php.

http://www.test.de/app_dev.php/

Then the caching is disabled and you can test your changes.

http://symfony.com/doc/current/cookbook/configuration/environments.html

Upvotes: 5

Related Questions