Development

#7925 (Custom cache dir does not seem to be used for CLI task)

You must first sign up to be able to contribute.

Ticket #7925 (new defect)

Opened 4 years ago

Custom cache dir does not seem to be used for CLI task

Reported by: Stefan.Koopmanschap Assigned to: fabien
Priority: major Milestone:
Component: cache Version: 1.2.10
Keywords: Cc:
Qualification: Unreviewed

Description

We have a project where we are setting the cache dir and the log dir in the ProjectConfiguration?:

$this->setLogDir('/opt/data/emma/log');
$this->setCacheDir('/opt/data/emma/cache');

When executing the log:rotate task, however, it seems the custom cache directory is not being used, because the following error occurs:

Failed to make cache directory "/mnt/sites/branches/emma.unet.nl/1.0.7/cache/batch/test/config" while generating cache for configuration file "config/config_handlers.yml".

I have searched the code for both the log:rotate task and the config cache handling, but have not found the cause of this issue myself. The CLI does load the ProjectConfiguration? right at the start, which should ensure no issues with the loading of the cache directory, still it does not work. Perhaps someone else will find the cause of this issue.