store: Record cache lookups in 'references/cached'.
* guix/store.scm (references/cached): Add call to 'record-cache-lookup!'.master
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)
|
(define (references/cached store item)
|
||||||
"Like 'references', but cache results."
|
"Like 'references', but cache results."
|
||||||
(let ((cache (store-connection-cache store %reference-cache-id)))
|
(let* ((cache (store-connection-cache store %reference-cache-id))
|
||||||
(match (vhash-assoc item cache)
|
(value (vhash-assoc item cache)))
|
||||||
|
(record-cache-lookup! %reference-cache-id value cache)
|
||||||
|
(match value
|
||||||
((_ . references)
|
((_ . references)
|
||||||
references)
|
references)
|
||||||
(#f
|
(#f
|
||||||
|
|
Reference in New Issue