Add a way to remove files from cache
This commit is contained in:
parent
7dbff46638
commit
0301b8366b
@ -109,3 +109,13 @@ bool cmListFileCache::CacheFile(const char* path)
|
|||||||
m_ListFileCache[path] = inFile;
|
m_ListFileCache[path] = inFile;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cmListFileCache::FlushCache(const char* path)
|
||||||
|
{
|
||||||
|
ListFileMap::iterator it = m_ListFileCache.find(path);
|
||||||
|
if ( it != m_ListFileCache.end() )
|
||||||
|
{
|
||||||
|
m_ListFileCache.erase(it);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -55,6 +55,10 @@ public:
|
|||||||
* NULL is returned.
|
* NULL is returned.
|
||||||
*/
|
*/
|
||||||
cmListFile* GetFileCache(const char* path);
|
cmListFile* GetFileCache(const char* path);
|
||||||
|
|
||||||
|
//! Flush cache file out of cache.
|
||||||
|
void FlushCache(const char* path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Cache the file
|
// Cache the file
|
||||||
bool CacheFile(const char* path);
|
bool CacheFile(const char* path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user