about summary refs log tree commit diff
path: root/src/libstore/binary-cache-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-20T13·27+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-04-20T13·27+0200
commitc0c4ddcd9c19a29e3dfd26160929f3278150547f (patch)
tree5f41f1999b38d187a415b4cad873db0c59e4427c /src/libstore/binary-cache-store.cc
parent451ebf24ce532f8d59f929efd486104fcebf1aa6 (diff)
BinaryCacheStore: Insert new paths into the disk cache
Diffstat (limited to 'src/libstore/binary-cache-store.cc')
-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++;
 }