Closed TiSiE closed 5 years ago
@TiSiE does it works now as expected?
I forget to report back in this issue, depth=0
in line 106 limit finder to find only in the root of cache dir:
So doctrine cache now is not wiped.
I am also set umask(0000)
, which means the file created by php in apache or in console should be writable to everyone.
Yeah, it works now.
I run into several issues with the ClearCacheService
If YAWIK is run within apache, all cached files are owned by the apache user ('www-data' per default)
Thus, if the 'clear-cache' command is run from the terminal, an IOException is thrown ('Permission denied') when trying to remove files in a directory owned by the apache user. (The DoctrineMongoODM cache, in particular. ) This issue does not occur, when running the command as root - but composer does not encourage this.
The service creates a checksum generated from the timestamp of all files.
The Doctrine cache is constantly altered. Each time an Entity is loaded for the first time from the database, a proxy class is generated and stored in the cache dir.
Meaning: The ClearCacheService will constantly wipe all files, because new proxy classes will be created on nearly every page request.