Fix bug where safari and firefox cache image for too long (#17148)

This commit is contained in:
Nicolas Mowen 2025-03-14 07:48:16 -06:00 committed by GitHub
parent fe078666c6
commit 2313b8ea05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,10 @@ export default function AutoUpdatingCameraImage({
let baseParam = ""; let baseParam = "";
if (periodicCache && !isCached) { if (periodicCache && !isCached) {
baseParam = "store=1"; const date = new Date(key);
date.setMinutes(date.getMinutes() - (date.getMinutes() % 10), 0, 0);
baseParam = `store=1&cache=${date.getTime() / 1000}`;
} else { } else {
baseParam = `cache=${key}`; baseParam = `cache=${key}`;
} }