From c0c4ddcd9c19a29e3dfd26160929f3278150547f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Apr 2016 15:27:48 +0200 Subject: [PATCH] BinaryCacheStore: Insert new paths into the disk cache --- src/libstore/binary-cache-store.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 3857ed93e..dacdeb3f5 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -8,6 +8,7 @@ #include "sync.hh" #include "worker-protocol.hh" #include "nar-accessor.hh" +#include "nar-info-disk-cache.hh" #include @@ -98,6 +99,9 @@ void BinaryCacheStore::addToCache(const ValidPathInfo & info, state_->pathInfoCache.upsert(narInfo->path, std::shared_ptr(narInfo)); } + if (diskCache) + diskCache->upsertNarInfo(getUri(), std::shared_ptr(narInfo)); + stats.narInfoWrite++; }