diff options
-rw-r--r-- | guix/store.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm index 82fca14cd9..efba07bdcd 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -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 |