From d373b7b452c6d64b47180940ed88c99c21bd9bc3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 19 Dec 2022 21:36:50 +0300 Subject: * bring back cache-busting for feed icons based on timestamp * DiskCache: use singleton pattern to create less cache object instances * DiskCache: implement ETag --- classes/counters.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes/counters.php') diff --git a/classes/counters.php b/classes/counters.php index 9699cb97c..48b7264dd 100644 --- a/classes/counters.php +++ b/classes/counters.php @@ -187,9 +187,9 @@ class Counters { $last_updated = TimeHelper::make_local_datetime($line['last_updated'], false); if (Feeds::_has_icon($id)) { - $has_img = filemtime(Feeds::_get_icon_file($id)); + $ts = filemtime(Feeds::_get_icon_file($id)); } else { - $has_img = false; + $ts = 0; } // hide default un-updated timestamp i.e. 1970-01-01 (?) -fox @@ -201,7 +201,7 @@ class Counters { "updated" => $last_updated, "counter" => (int) $line["count"], "markedcounter" => (int) $line["count_marked"], - "has_img" => (int) $has_img + "ts" => (int) $ts ]; $cv["error"] = $line["last_error"]; -- cgit v1.2.3