/** * Clear the cache files related to Cabins. * * @return bool */ public function clearCache() : bool { $name = $this->makeNamespace($this->supplier->getName(), $this->package); $toDelete = [\implode(DIRECTORY_SEPARATOR, [ROOT, 'tmp', 'cache', 'cargo-' . $name . '.cache.json']), \implode(DIRECTORY_SEPARATOR, [ROOT, 'tmp', 'cache', 'csp.' . $name . '.json']), \implode(DIRECTORY_SEPARATOR, [ROOT, 'tmp', 'cache', $name . '.motifs.json'])]; foreach ($toDelete as $file) { if (\file_exists($file)) { \unlink($file); } } return parent::clearCache(); }