possiblité de forcer la suppression
This commit is contained in:
parent
3933fd1e72
commit
3b13ef126c
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user