Clear cache with after deploy hook on pagodabox
pagodabox is a good alternative to host a Symfony2 site. When updating it all you need to do is commit to your master branch and push it to pagodabox, then clear the cache via ssh to deploy the site. But the last step can be automated with an after deploy hook.
An after deploy hook is is added in the boxfile and all we need to add is this:
after_deploy: - “rm -R app/cache/”
Update: Tobias Sjösten (thanks for the tip!) had an improvement to the hook, and it is to use symfonys console tool to clear the cache like this:
- “php app/console cache:clear –env=prod –no-debug”
An example of a boxfile with after_deploy hook included: