views:

86

answers:

3

I have a file located at [application]/config/routing.yml, when I change something in there, the changes aren't active. This probably has to do with the cache as when I go into that directory [cache]/[application]/prod/config the currently active file can be seen config_routing.yml.php.

The lifetime of the cache is generally 86400 seconds, is there a way that I can immediately view/activate the changes?

+3  A: 

Use the dev environment instead of the prod environment. You can access the dev environment by going to your index_dev.php file instead of the index.php file:

http://localhost/index_dev.php

The dev environment by passes the cache so you can see your changes immediately. You can also run a clear cache command after each change to see your changes in the prod environment:

symfony cc
Peter D
+1  A: 

Always clear the cache after making a change to a YAML file in symfony, whether you are operating in the dev or prod environment. The dev environment generates the cache for each web request, but not for CLI requests. Therefore it's a good habit to always manually run symfony cc after a YAML change.

Raise
A: 

Clear the cache after changes to any config files: $ symfony cc

Tom