title: Set the path of the symfony2 cache files during cache:clear
body: <p>So my question is simple : Can we set the path of the symfony2 cache files during <strong>cache:clear</strong>, can we change it later or can we make it relative ? Or anything ?</p>
  
  <p>Explanation :</p>
  
  <p>I'm deploying a Symfony2 application on Heroku using a fork of a fork of <a href="https://github.com/iphoting/heroku-buildpack-php-tyler" rel="nofollow">heroku-buildpack-php-tyler</a> : <a href="https://github.com/Azer-/heroku-buildpack-symfony2" rel="nofollow">heroku-buildpack-symfony2</a>.</p>
  
  <p>On deployment the platform receives a <strong>git push</strong> to a random temporary location say <em>/tmpXXXX/</em> for compilation/installation/etc.</p>
  
  <p>After compilation it stores the content of <em>/tmpXXXX/</em> like a 'zip install' of the app to easily to deploy it on other instances. Then the app gets deployed to the <em>/app/</em> dir of new instances on startup.</p>
  
  <p><strong>Problem is</strong>, if we run a <strong>cache:clear</strong> before the end of the compilation, the path of the cache files are dumped from the <em>/tmpXXXX/</em> location... Breaking everything.</p>
  
  <p>So the turnaround is to warmup the cache during startup, and it works, but it often takes more than 60 seconds, and on heroku if your app boots in more than 60 second, <a href="https://devcenter.heroku.com/articles/error-codes#h20-app-boot-timeout" rel="nofollow">it gets rebooted</a> and you get an error.</p>