From: vincent@cubedesigners.com Date: Mon, 7 Mar 2022 16:17:18 +0000 (+0000) Subject: wait #5148 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=c244013b15838015213ce02ca55a3768537e4242;p=cubeextranet.git wait #5148 @1.5 --- 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;