store: Record cache lookups in 'references/cached'.
* guix/store.scm (references/cached): Add call to 'record-cache-lookup!'.
This commit is contained in:
parent
98e2f4fbeb
commit
40530ffd15
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user