if ('\\' === \DIRECTORY_SEPARATOR && \
strlen($directory) > 234
) { throw new InvalidArgumentException(sprintf('Cache directory too long (%s).',
$directory));
} $this->directory =
$directory;
} protected function doClear(string
$namespace): bool
{ $ok = true;
foreach ($this->
scanHashDir($this->directory
) as $file) { if ('' !==
$namespace && !
str_starts_with($this->
getFileKey($file),
$namespace)) { continue;
} $ok =
($this->
doUnlink($file) || !
file_exists($file)) &&
$ok;
} return $ok;
} protected function doDelete(array
$ids): bool
{