Description
I was making myself up to date with Symfony 4, and here Fabien wrote this:
var/cache/ should now only be used to store long term cached contents like compiled container files, compiled translations, or Doctrine proxies. No temporary files. Basically, anything stored under var/cache should have a warmup class able to generate the cache files. Files that should never be updated after deployment to allow for read-only filesystems.
First thought:
var
read only
I didn't find anyone complaining so I decided to write this. Isn't it a problem? By making var/cache
read-only aren't we introducing a new, important type of code - compiled code, which deserves its own directory, like build
for example? Maybe that directory could also contain CSS compiled from SASS in the long run and such? This directory could be read-only and be build only once before deploying the app.
I'm not suggesting that it should be the case, just asking what the community thinks, because I'm curious.