summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mumi/debbugs.scm21
1 files changed, 14 insertions, 7 deletions
diff --git a/mumi/debbugs.scm b/mumi/debbugs.scm
index 086e89a..4e0666f 100644
--- a/mumi/debbugs.scm
+++ b/mumi/debbugs.scm
@@ -141,13 +141,20 @@ search the index of archived issues."
"Open up a Debbugs index file and return the bug numbers for those
lines that match one of PACKAGES. If ARCHIVED? is #T search the index
of archived issues."
- (filter-index (lambda (line)
- (any (lambda (package)
- (string-prefix? package line))
- packages))
- (lambda (line)
- (second (string-split line #\space)))
- #:archived? archived?))
+ (define cache-key
+ (list 'extract-bug-numbers packages archived?))
+ (define cached (cached? cache-key))
+ (or cached
+ (let ((result
+ (filter-index (lambda (line)
+ (any (lambda (package)
+ (string-prefix? package line))
+ packages))
+ (lambda (line)
+ (second (string-split line #\space)))
+ #:archived? archived?)))
+ (cache! cache-key result)
+ result)))
(define* (forgotten-bug-numbers packages #:key (seconds-ago (* 60 60 24 30)))
"Return the numbers of issues that are open but haven't seen any