diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index f58dbde35..e07dec495 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 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;