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é */
function deleteExpired(): bool {
function deleteExpired(bool $force=false): bool {
try {
if ($this->shouldUpdate()) {
unlink($this->ppFile);
if ($force || $this->shouldUpdate()) {
@unlink($this->ppFile);
return true;
}
} finally {