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
1 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue