[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: substitute: Honor 'Cache-Control' on 404 responses.
From: |
Ludovic Courtès |
Subject: |
02/04: substitute: Honor 'Cache-Control' on 404 responses. |
Date: |
Thu, 11 May 2017 12:07:33 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 5db5dff53d255eb0738de4b44717a4b148fb8294
Author: Ludovic Courtès <address@hidden>
Date: Thu May 11 10:24:49 2017 +0200
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.
---
guix/scripts/substitute.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 53162b3..73d4f6e 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -472,9 +472,9 @@ for PATH."
(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 @@ was found."
(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))