From 8d24702dc274037cbbbd13152f39a249e48f19b8 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Mon, 29 Jan 2024 15:33:34 -0500 Subject: [PATCH] change the cache a bit so people sometimes see new stuff --- webtemplate.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webtemplate.d b/webtemplate.d index 31c9cac..4ac39ee 100644 --- a/webtemplate.d +++ b/webtemplate.d @@ -731,7 +731,7 @@ auto serveTemplateDirectory()(string urlPrefix, string directory = null, string auto fn = details.templateDirectory ~ details.directory ~ file ~ details.extension; if(std.file.exists(fn)) { - cgi.setCache(true); + cgi.setResponseExpiresRelative(600, true); // 10 minute cache expiration by default, FIXME it should be configurable auto doc = renderTemplate(fn[details.templateDirectory.length.. $], var.emptyObject, var.emptyObject, details.skeleton, TemplateLoader.forDirectory(details.templateDirectory)); cgi.gzipResponse = true; cgi.write(doc.toString, true);