me
/
guix
Archived
1
0
Fork 0

store: Record cache lookups in 'references/cached'.

* guix/store.scm (references/cached): Add call to
'record-cache-lookup!'.
master
Ludovic Courtès 2022-05-29 22:58:56 +02:00
parent 98e2f4fbeb
commit 40530ffd15
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 2 deletions

View File

@ -1840,8 +1840,10 @@ This is a mutating version that should be avoided. Prefer the functional
(define (references/cached store item)
"Like 'references', but cache results."
(let ((cache (store-connection-cache store %reference-cache-id)))
(match (vhash-assoc item cache)
(let* ((cache (store-connection-cache store %reference-cache-id))
(value (vhash-assoc item cache)))
(record-cache-lookup! %reference-cache-id value cache)
(match value
((_ . references)
references)
(#f