CodeExplorer doUnlink example
try { foreach ($this->
scanHashDir($this->directory
) as $file) { try { if (\
is_array($expiresAt =
include $file)) { $expiresAt =
$expiresAt[0
];
} } catch (\ErrorException
$e) { $expiresAt =
$time;
} if ($time >=
$expiresAt) { $pruned =
($this->
doUnlink($file) || !
file_exists($file)) &&
$pruned;
} } } finally { restore_error_handler();
} return $pruned;
} protected function doFetch(array
$ids): iterable
{ 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
{ $ok = true;
foreach ($ids as $id) { $file =
$this->
getFile($id);