tedious/TedivmStashBundle

Create FileSystem cache directory during compilation

andrerom opened this issue · 2 comments

There is currently a small issue in regards to using FileSystem with it's default settings, basically you will get an exception complaining about missing directory which could be avoided, and this is pr environment, so you have to go true this twice usually as defaults for console tend to be 'dev', while your site is 'prod'.

Possible way to make this transparent to most users would be to check if folder exists during compilation, and if not:

  • make sure parent folder exists and is writable, if not throw
  • create the sub folder using configured dirPermissions

Actually this is not an issue in the bundle, but in Stash lib : https://github.com/tedivm/Stash/blob/master/src/Stash/Driver/FileSystem.php#L387
There should be an attempt to create the cache directory before throwing the exception.

I'm closing this out since it was resolved upstream. Thanks!