substitute: Honor 'Cache-Control' on 404 responses.
* guix/scripts/substitute.scm (cached-narinfo): When VALUE is #f, use the TTL that is read instead of %NARINFO-NEGATIVE-TTL. (cached-narinfo-expiration-time): Likewise.
This commit is contained in:
parent
24b21720f7
commit
5db5dff53d
1 changed files with 3 additions and 3 deletions
|
@ -472,9 +472,9 @@ (define cache-file
|
|||
(match (read p)
|
||||
(('narinfo ('version 2)
|
||||
('cache-uri cache-uri)
|
||||
('date date) ('ttl _) ('value #f))
|
||||
('date date) ('ttl ttl) ('value #f))
|
||||
;; A cached negative lookup.
|
||||
(if (obsolete? date now %narinfo-negative-ttl)
|
||||
(if (obsolete? date now ttl)
|
||||
(values #f #f)
|
||||
(values #t #f)))
|
||||
(('narinfo ('version 2)
|
||||
|
@ -722,7 +722,7 @@ (define (cached-narinfo-expiration-time file)
|
|||
(match (read port)
|
||||
(('narinfo ('version 2) ('cache-uri uri)
|
||||
('date date) ('ttl ttl) ('value #f))
|
||||
(+ date %narinfo-negative-ttl))
|
||||
(+ date ttl))
|
||||
(('narinfo ('version 2) ('cache-uri uri)
|
||||
('date date) ('ttl ttl) ('value value))
|
||||
(+ date ttl))
|
||||
|
|
Loading…
Reference in a new issue