[PATCH v2 22/22] ui-shared: cache errors for "dynamic TTL"
John Keeping
john at keeping.me.uk
Fri Aug 14 13:47:22 CEST 2015
Most errors we generate are (potentially) transient, such as
non-existent object IDs so we don't want them to be cached forever.
Signed-off-by: John Keeping <john at keeping.me.uk>
---
ui-shared.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui-shared.c b/ui-shared.c
index de06256..89c4897 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -791,6 +791,7 @@ void cgit_print_docend(void)
void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
{
va_list ap;
+ ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
ctx.page.status = code;
ctx.page.statusmsg = msg;
cgit_print_http_headers();
--
2.5.0.466.g9af26fa
More information about the CGit
mailing list