about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJohn Keeping2015-08-14 12:47:22 +0100
committerJason A. Donenfeld2015-08-14 15:46:51 +0200
commitc5975ae56684a1188637f2bdba7d8e18de075abc (patch)
tree4159705411cb1a8ffb4850d42222e866514ef1f8
parentcmd: remove "want_layout" field (diff)
downloadcgit-c5975ae56684a1188637f2bdba7d8e18de075abc.tar.gz
cgit-c5975ae56684a1188637f2bdba7d8e18de075abc.zip
ui-shared: cache errors for "dynamic TTL"
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@keeping.me.uk>
-rw-r--r--ui-shared.c1
1 files changed, 1 insertions, 0 deletions
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)
791void cgit_print_error_page(int code, const char *msg, const char *fmt, ...) 791void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
792{ 792{
793 va_list ap; 793 va_list ap;
794 ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
794 ctx.page.status = code; 795 ctx.page.status = code;
795 ctx.page.statusmsg = msg; 796 ctx.page.statusmsg = msg;
796 cgit_print_http_headers(); 797 cgit_print_http_headers();