aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/nar-info-disk-cache.cc
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-01-30 22:15:23 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-02-07 23:34:36 +0100
commit2ceece3ef384385d886f6aed5311d9b6dbbdd6dd (patch)
treeae598195b919806ce65a35ca885fdeb4354a1f51 /src/libstore/nar-info-disk-cache.cc
parent79f62d2dda8603c1f2f471ce20557548db932296 (diff)
NarInfoDiskCache: Prepare reproducer for #3898
Diffstat (limited to 'src/libstore/nar-info-disk-cache.cc')
-rw-r--r--src/libstore/nar-info-disk-cache.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/nar-info-disk-cache.cc b/src/libstore/nar-info-disk-cache.cc
index c460100de..494318af9 100644
--- a/src/libstore/nar-info-disk-cache.cc
+++ b/src/libstore/nar-info-disk-cache.cc
@@ -207,6 +207,7 @@ public:
if (!cache)
return std::nullopt;
return CacheInfo {
+ .id = cache->id,
.wantMassQuery = cache->wantMassQuery,
.priority = cache->priority
};
@@ -370,4 +371,9 @@ ref<NarInfoDiskCache> getNarInfoDiskCache()
return cache;
}
+ref<NarInfoDiskCache> getTestNarInfoDiskCache(Path dbPath)
+{
+ return make_ref<NarInfoDiskCacheImpl>(dbPath);
+}
+
}