From 0b0ad62a4d0a3a33bc08adfb38af458697d6b938 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 16 Feb 2025 09:26:37 +0000 Subject: [PATCH] feat(http): revalidate .json every ten minutes rather than 1 hour --- src/net/http.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/net/http.rs b/src/net/http.rs index b72a3729b..4738d76eb 100644 --- a/src/net/http.rs +++ b/src/net/http.rs @@ -108,6 +108,10 @@ fn http_url_cache_timestamps(url: &str, mimetype: Option<&str>) -> (i64, i64) { // use the same path for all app versions, // so may change, but it is not critical if outdated icon is displayed. now + 3600 * 24 + } else if url.ends_with(".json") { + // Revalidate JSON such as https://apps.testrun.org/xdcget-lock.json + // every 10 minutes. + now + 600 } else { // Revalidate everything else after 1 hour. //