possiblité de forcer la suppression

This commit is contained in:
Jephté Clain 2025-04-22 18:54:38 +04:00
parent 3933fd1e72
commit 3b13ef126c

View File

@ -287,10 +287,10 @@ abstract class FileCachedValue extends Parametrable implements ArrayAccess, Coun
} }
/** supprimer le fichier s'il a expiré */ /** supprimer le fichier s'il a expiré */
function deleteExpired(): bool { function deleteExpired(bool $force=false): bool {
try { try {
if ($this->shouldUpdate()) { if ($force || $this->shouldUpdate()) {
unlink($this->ppFile); @unlink($this->ppFile);
return true; return true;
} }
} finally { } finally {