diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-04-06T13·22+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-04-06T13·22+0200 |
commit | 6b5e2711632c345f2b6a371ef8a859106436980a (patch) | |
tree | d8282582faad6c20903e6156029445aa5288b8c0 | |
parent | 256940fc48a6db950136fb0bc43590b701a3e857 (diff) |
Add a method to allow hydra-queue-runner to flush the path info cache
-rw-r--r-- | src/libstore/store-api.hh | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index f58dbde350c7..e07dec495470 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -252,11 +252,6 @@ protected: public: - size_t getCacheSize() - { - return state.lock()->pathInfoCache.size(); - } - virtual ~Store() { } virtual std::string getUri() = 0; @@ -578,6 +573,13 @@ public: virtual std::shared_ptr<std::string> getBuildLog(const Path & path) { return nullptr; } + /* Hack to allow long-running processes like hydra-queue-runner to + occasionally flush their path info cache. */ + void clearPathInfoCache() + { + state.lock()->pathInfoCache.clear(); + } + protected: Stats stats; |