summaryrefslogtreecommitdiff
path: root/classes/handler
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-12-19 21:36:50 +0300
committerAndrew Dolgov <[email protected]>2022-12-19 21:36:50 +0300
commitd373b7b452c6d64b47180940ed88c99c21bd9bc3 (patch)
tree08024adea61fcee2f646554a349ea90b30a150b4 /classes/handler
parent20d6aaa9ab976d3e044fbd7ad2b1167260cc213c (diff)
* bring back cache-busting for feed icons based on timestamp
* DiskCache: use singleton pattern to create less cache object instances * DiskCache: implement ETag
Diffstat (limited to 'classes/handler')
-rwxr-xr-xclasses/handler/public.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index b848b15fe..190c806be 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -759,7 +759,7 @@ class Handler_Public extends Handler {
// we do not allow files with extensions at the moment
$filename = str_replace(".", "", $filename);
- $cache = new DiskCache($cache_dir);
+ $cache = DiskCache::instance($cache_dir);
if ($cache->exists($filename)) {
$cache->send($filename);
@@ -771,7 +771,7 @@ class Handler_Public extends Handler {
function feed_icon() : void {
$id = (int)$_REQUEST['id'];
- $cache = new DiskCache('feed-icons');
+ $cache = DiskCache::instance('feed-icons');
if ($cache->exists((string)$id)) {
$cache->send((string)$id);