From 40530ffd15ece6ec610a43221293010fe3b9234b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 29 May 2022 22:58:56 +0200 Subject: store: Record cache lookups in 'references/cached'. * guix/store.scm (references/cached): Add call to 'record-cache-lookup!'. --- guix/store.scm | 6 ++++-- 1 file 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 -- cgit 1.4.1