summaryrefslogtreecommitdiffstats
path: root/src/disk_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/disk_interface.h')
-rw-r--r--src/disk_interface.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/disk_interface.h b/src/disk_interface.h
index bb40dc9..40c24b6 100644
--- a/src/disk_interface.h
+++ b/src/disk_interface.h
@@ -61,7 +61,7 @@ struct RealDiskInterface : public DiskInterface {
, use_cache_(false)
#endif
{}
- virtual ~RealDiskInterface() {}
+ virtual ~RealDiskInterface() { ClearCache(); }
virtual TimeStamp Stat(const string& path);
virtual bool MakeDir(const string& path);
virtual bool WriteFile(const string& path, const string& contents);
@@ -70,6 +70,9 @@ struct RealDiskInterface : public DiskInterface {
/// Whether to print on errors. Used to make a test quieter.
bool quiet_;
+
+ /// Whether stat information can be cached.
+ void AllowCache(bool allow);
#ifdef _WIN32
/// Whether stat information can be cached.
bool use_cache_;
@@ -80,6 +83,7 @@ struct RealDiskInterface : public DiskInterface {
typedef map<string, DirCache*> Cache;
Cache cache_;
#endif
+ void ClearCache();
};
#endif // NINJA_DISK_INTERFACE_H_