* 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

@@ -71,7 +71,7 @@ const Feeds = {
const kind = elems[l].kind;
const ctr = parseInt(elems[l].counter);
const error = elems[l].error;
const has_img = elems[l].has_img;
const ts = elems[l].ts;
const updated = elems[l].updated;
if (id == "global-unread") {
@@ -98,9 +98,9 @@ const Feeds = {
this.setValue(id, false, 'updated', updated);
if (id > 0) {
if (has_img) {
if (ts) {
this.setIcon(id, false,
App.getInitParam("icons_url") + '?' + dojo.objectToQuery({op: 'feed_icon', id: id}));
App.getInitParam("icons_url") + '?' + dojo.objectToQuery({op: 'feed_icon', id: id, ts: ts}));
} else {
this.setIcon(id, false, 'images/blank_icon.gif');
}