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>
This commit is contained in:
والد
a420c7ce9b
کامیت
c5975ae566
@ -791,6 +791,7 @@ void cgit_print_docend(void)
|
|||||||
void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
|
void cgit_print_error_page(int code, const char *msg, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
ctx.page.expires = ctx.cfg.cache_dynamic_ttl;
|
||||||
ctx.page.status = code;
|
ctx.page.status = code;
|
||||||
ctx.page.statusmsg = msg;
|
ctx.page.statusmsg = msg;
|
||||||
cgit_print_http_headers();
|
cgit_print_http_headers();
|
||||||
|
بارگذاری…
مرجع در شماره جدید
Block a user