From c0c4ddcd9c19a29e3dfd26160929f3278150547f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 20 Apr 2016 15:27:48 +0200 Subject: BinaryCacheStore: Insert new paths into the disk cache --- src/libstore/binary-cache-store.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libstore/binary-cache-store.cc') diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 3857ed93e212..dacdeb3f52fd 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++; } -- cgit 1.4.1