From eeceda0ca8f37e766d5db7748cf9bc5a71fcb845 Mon Sep 17 00:00:00 2001 From: Athou Date: Sun, 11 May 2025 18:02:48 +0200 Subject: [PATCH] increase static resources cache duration (#1782) --- commafeed-server/src/main/resources/application.properties | 1 + .../src/test/java/com/commafeed/integration/StaticFilesIT.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commafeed-server/src/main/resources/application.properties b/commafeed-server/src/main/resources/application.properties index 6769f783..6d6c1e73 100644 --- a/commafeed-server/src/main/resources/application.properties +++ b/commafeed-server/src/main/resources/application.properties @@ -4,6 +4,7 @@ quarkus.http.test-port=8085 quarkus.http.enable-compression=true # http cache +quarkus.http.static-resources.max-age=P30d ## make sure the webapp is always up to date quarkus.http.filter.index-html.header."Cache-Control"=no-cache quarkus.http.filter.index-html.matches=/ diff --git a/commafeed-server/src/test/java/com/commafeed/integration/StaticFilesIT.java b/commafeed-server/src/test/java/com/commafeed/integration/StaticFilesIT.java index 3e451bb1..231213f7 100644 --- a/commafeed-server/src/test/java/com/commafeed/integration/StaticFilesIT.java +++ b/commafeed-server/src/test/java/com/commafeed/integration/StaticFilesIT.java @@ -18,6 +18,6 @@ class StaticFilesIT { @ParameterizedTest @ValueSource(strings = { "/favicon.ico" }) void servedWithCache(String path) { - RestAssured.given().when().get(path).then().statusCode(200).header("Cache-Control", "public, immutable, max-age=86400"); + RestAssured.given().when().get(path).then().statusCode(200).header("Cache-Control", "public, immutable, max-age=2592000"); } }