PR feedback

This commit is contained in:
Brad Davis 2017-06-16 20:04:23 -07:00
parent a675dfe7d2
commit 1632e3b35a

View file

@ -285,10 +285,12 @@ void FileCache::wipe() {
}
void FileCache::clear() {
Lock lock(_mutex);
// Eliminate any overbudget files
clean();
// Mark everything remaining as persisted
// Mark everything remaining as persisted while effectively ejecting from the cache
for (auto& file : _unusedFiles) {
file->_shouldPersist = true;
file->_cache = nullptr;