From c244013b15838015213ce02ca55a3768537e4242 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 7 Mar 2022 16:17:18 +0000 Subject: [PATCH] wait #5148 @1.5 --- inc/ws/Metier/class.ws.document.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/ws/Metier/class.ws.document.php b/inc/ws/Metier/class.ws.document.php index 0fbb8911a..b9027769a 100644 --- a/inc/ws/Metier/class.ws.document.php +++ b/inc/ws/Metier/class.ws.document.php @@ -417,9 +417,11 @@ class wsDocument extends cubeMetier public function getFilesData() { + if ($this->filesdata === null) { + $limit = time() - 604800; $f = $this->out . '/filesdata.json'; - if (file_exists($f)) { + if (file_exists($f) && filemtime($f) > $limit) { $this->filesdata = json_decode(file_get_contents($f), true); } else { $this->filesdata = []; @@ -491,6 +493,8 @@ class wsDocument extends cubeMetier if ($do || $force) { $this->makeFile($file, $page, $format, $resolution, $withText, $withGraphics, $version); + } else { + touch($file); } return $file; -- 2.39.5