* bring back cache-busting for feed icons based on timestamp

* DiskCache: use singleton pattern to create less cache object instances
 * DiskCache: implement ETag
This commit is contained in:
Andrew Dolgov
2022-12-19 21:36:50 +03:00
parent 20d6aaa9ab
commit d373b7b452
10 changed files with 43 additions and 31 deletions

View File

@@ -1163,7 +1163,7 @@ class Feeds extends Handler_Protected {
}
static function _get_icon_file(int $feed_id): string {
$favicon_cache = new DiskCache('feed-icons');
$favicon_cache = DiskCache::instance('feed-icons');
return $favicon_cache->get_full_path((string)$feed_id);
}
@@ -1182,7 +1182,7 @@ class Feeds extends Handler_Protected {
}
static function _has_icon(int $feed_id): bool {
$favicon_cache = new DiskCache('feed-icons');
$favicon_cache = DiskCache::instance('feed-icons');
return $favicon_cache->exists((string)$feed_id);
}