From 256940fc48a6db950136fb0bc43590b701a3e857 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 6 Apr 2017 14:30:31 +0200 Subject: nix-daemon: Disable path info cache This is useless because the client also caches path info, and can cause problems for long-running clients like hydra-queue-runner (i.e. it may return cached info about paths that have been garbage-collected). --- src/libstore/store-api.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libstore/store-api.hh') diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 98f2803f8136..f58dbde350c7 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -241,7 +241,7 @@ protected: struct State { - LRUCache> pathInfoCache{64 * 1024}; + LRUCache> pathInfoCache; }; Sync state; @@ -252,6 +252,11 @@ protected: public: + size_t getCacheSize() + { + return state.lock()->pathInfoCache.size(); + } + virtual ~Store() { } virtual std::string getUri() = 0; -- cgit 1.4.1