Replace nearly all ?v= cachebusts with assetcache.

Using the new assetcache module, we replace (almost) all instances
of `?v=` cachebusting query parameters in Python and in Jinja templates.
The primary exceptions were: user site backgrounds, and some
infrequently changed graphics referenced literally from .js files.
This commit is contained in:
TLSM 2022-08-30 17:02:46 -04:00
parent 6f3b995455
commit a35697e55e
No known key found for this signature in database
GPG key ID: E745A82778055C7E
44 changed files with 203 additions and 191 deletions

View file

@ -11,6 +11,7 @@ from pusher_push_notifications import PushNotifications
from flask import *
from files.__main__ import app, limiter
from files.helpers.sanitize import filter_emojis_only
from files.helpers.assetcache import assetcache_path
import requests
from shutil import copyfile
from json import loads
@ -38,7 +39,7 @@ def pusher_thread(interests, c, username):
'title': f'New reply by @{username}',
'body': notifbody,
'deep_link': f'{SITE_FULL}/comment/{c.id}?context=8&read=true#context',
'icon': f'{SITE_FULL}/assets/images/{SITE_ID}/icon.webp?v=1015',
'icon': SITE_FULL + assetcache_path(f'images/{SITE_ID}/icon.webp'),
}
},
'fcm': {