forked from lix-project/lix
Add a method to allow hydra-queue-runner to flush the path info cache
This commit is contained in:
parent
256940fc48
commit
6b5e271163
|
@ -252,11 +252,6 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
size_t getCacheSize()
|
|
||||||
{
|
|
||||||
return state.lock()->pathInfoCache.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~Store() { }
|
virtual ~Store() { }
|
||||||
|
|
||||||
virtual std::string getUri() = 0;
|
virtual std::string getUri() = 0;
|
||||||
|
@ -578,6 +573,13 @@ public:
|
||||||
virtual std::shared_ptr<std::string> getBuildLog(const Path & path)
|
virtual std::shared_ptr<std::string> getBuildLog(const Path & path)
|
||||||
{ return nullptr; }
|
{ 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:
|
protected:
|
||||||
|
|
||||||
Stats stats;
|
Stats stats;
|
||||||
|
|
Loading…
Reference in a new issue