mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +02:00
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).
This commit is contained in:
parent
8decb07c31
commit
256940fc48
5 changed files with 17 additions and 5 deletions
|
@ -241,7 +241,7 @@ protected:
|
|||
|
||||
struct State
|
||||
{
|
||||
LRUCache<std::string, std::shared_ptr<ValidPathInfo>> pathInfoCache{64 * 1024};
|
||||
LRUCache<std::string, std::shared_ptr<ValidPathInfo>> pathInfoCache;
|
||||
};
|
||||
|
||||
Sync<State> state;
|
||||
|
@ -252,6 +252,11 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
size_t getCacheSize()
|
||||
{
|
||||
return state.lock()->pathInfoCache.size();
|
||||
}
|
||||
|
||||
virtual ~Store() { }
|
||||
|
||||
virtual std::string getUri() = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue