On production we use amazon opsworks to orchestrate our machines. I've created a chef recipe to deploy new code (so actually creating a new release folder, do things there, then switch symlink to new folder) and another recipe that reconfigures our symfony app changing a yml file when a new database slave is added and so on.
The problem is that the reconfigure stage happens on current running code and since I've to run cache:clear and cache:warmup the requests in the meanwhile fails since they don't find cache files/folders.
How could I clear the cache instantly? Maybe warming it up in another folder and then switching those?
Better solutions?