From 7a602f8ca940ff904118b0a03384937c3439ffc7 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 24 Jul 2019 04:07:22 +0200 Subject: [PATCH 1/1] expire symlink requests by lstatted mtime Support refreshing linked targets without changing original data. --- widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget.php b/widget.php index d1b3b88..463ff67 100644 --- a/widget.php +++ b/widget.php @@ -19,7 +19,7 @@ function error($message, $status = 500) $request = trim($_SERVER['PATH_INFO'], '/'); $target = "data/$request.json"; -$last = file_exists($target) ? filemtime($target) : 0; +$last = file_exists($target) ? lstat($target)['mtime'] : 0; if ($last < time() - 3600) { $recipe = NULL; -- 2.30.0