1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 00:11:17 +02:00

BinaryCacheStore: Do negative caching of .narinfo lookups

This commit is contained in:
Eelco Dolstra 2016-04-15 15:25:15 +02:00
parent d1b0909894
commit a7d8eaba54
2 changed files with 12 additions and 3 deletions

View file

@ -24,7 +24,7 @@ private:
struct State
{
LRUCache<Path, ref<NarInfo>> narInfoCache{32 * 1024};
LRUCache<Path, std::shared_ptr<NarInfo>> narInfoCache{32 * 1024};
};
Sync<State> state;
@ -51,6 +51,7 @@ public:
{
std::atomic<uint64_t> narInfoRead{0};
std::atomic<uint64_t> narInfoReadAverted{0};
std::atomic<uint64_t> narInfoMissing{0};
std::atomic<uint64_t> narInfoWrite{0};
std::atomic<uint64_t> narInfoCacheSize{0};
std::atomic<uint64_t> narRead{0};