mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Update directory structure & allow to configure paths (tmp, log, cache)
This commit is contained in:
@@ -31,21 +31,16 @@ class module_console_systemClearCache extends Command
|
||||
{
|
||||
$finder = new Finder();
|
||||
|
||||
$in = [];
|
||||
foreach ($this->container['cache.paths'] as $path) {
|
||||
$in[] = $path;
|
||||
};
|
||||
$finder
|
||||
->exclude('.git')
|
||||
->exclude('.svn')
|
||||
->in([
|
||||
$this->container['root.path'] . '/tmp/cache_minify/',
|
||||
$this->container['root.path'] . '/tmp/cache_twig/',
|
||||
$this->container['root.path'] . '/tmp/translations/',
|
||||
$this->container['root.path'] . '/tmp/cache/profiler/',
|
||||
$this->container['root.path'] . '/tmp/doctrine/',
|
||||
$this->container['root.path'] . '/tmp/serializer/',
|
||||
]);
|
||||
->in($in);
|
||||
|
||||
$filesystem = new Filesystem();
|
||||
|
||||
$filesystem->remove($finder);
|
||||
$this->container['filesystem']->remove($finder);
|
||||
|
||||
if ($this->container['phraseanet.configuration-tester']->isInstalled()) {
|
||||
$this->getService('phraseanet.cache-service')->flushAll();
|
||||
|
Reference in New Issue
Block a user