about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/binary-cache-store.cc4
1 files changed, 4 insertions, 0 deletions
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 <chrono>
 
@@ -98,6 +99,9 @@ void BinaryCacheStore::addToCache(const ValidPathInfo & info,
         state_->pathInfoCache.upsert(narInfo->path, std::shared_ptr<NarInfo>(narInfo));
     }
 
+    if (diskCache)
+        diskCache->upsertNarInfo(getUri(), std::shared_ptr<NarInfo>(narInfo));
+
     stats.narInfoWrite++;
 }