From 3b13ef126cf36c9f3b15496303667feb4287039f Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 22 Apr 2025 18:54:38 +0400 Subject: [PATCH] =?UTF-8?q?possiblit=C3=A9=20de=20forcer=20la=20suppressio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nur_src/b/io/FileCachedValue.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nur_src/b/io/FileCachedValue.php b/nur_src/b/io/FileCachedValue.php index c988b36..66aff97 100644 --- a/nur_src/b/io/FileCachedValue.php +++ b/nur_src/b/io/FileCachedValue.php @@ -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 {