BinaryCacheStore: Insert new paths into the disk cache
This commit is contained in:
parent
451ebf24ce
commit
c0c4ddcd9c
|
@ -8,6 +8,7 @@
|
||||||
#include "sync.hh"
|
#include "sync.hh"
|
||||||
#include "worker-protocol.hh"
|
#include "worker-protocol.hh"
|
||||||
#include "nar-accessor.hh"
|
#include "nar-accessor.hh"
|
||||||
|
#include "nar-info-disk-cache.hh"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
|
@ -98,6 +99,9 @@ void BinaryCacheStore::addToCache(const ValidPathInfo & info,
|
||||||
state_->pathInfoCache.upsert(narInfo->path, std::shared_ptr<NarInfo>(narInfo));
|
state_->pathInfoCache.upsert(narInfo->path, std::shared_ptr<NarInfo>(narInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (diskCache)
|
||||||
|
diskCache->upsertNarInfo(getUri(), std::shared_ptr<NarInfo>(narInfo));
|
||||||
|
|
||||||
stats.narInfoWrite++;
|
stats.narInfoWrite++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue