From 71d2bdfa9fce546e8d8d5103aee4e1096ce65ecf Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 4 Feb 2022 10:00:50 +0000 Subject: services: nar-herder: Support ttl and negative-ttl options. * gnu/services/guix.scm (): Add ttl and negative-ttl fields. (nar-herder-shepherd-services): Pass the ttl and negative-ttl values to the service. * doc/guix.texi (Guix Services): Document this. --- doc/guix.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index aaa7cbb66f..0cf865a672 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33721,6 +33721,20 @@ Each criteria is specified by a string, then an equals sign, then another string. Currently, only one criteria is supported, checking if a nar is stored on another Nar Herder instance. +@item @code{ttl} (default: @code{#f}) +Produce @code{Cache-Control} HTTP headers that advertise a time-to-live +(TTL) of @var{ttl}. @var{ttl} must denote a duration: @code{5d} means 5 +days, @code{1m} means 1 month, and so on. + +This allows the user's Guix to keep substitute information in cache for +@var{ttl}. + +@item @code{negative-ttl} (default: @code{#f}) +Similarly produce @code{Cache-Control} HTTP headers to advertise the +time-to-live (TTL) of @emph{negative} lookups---missing store items, for +which the HTTP 404 code is returned. By default, no negative TTL is +advertised. + @end table @end deftp -- cgit v1.2.3