improved behavior of hash cache

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4663 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-11-05 22:31:45 +00:00
parent fa690de1d6
commit ded1707151

View File

@ -85,7 +85,6 @@ void FileIndexMonitor::setRememberHashFilesDuration(uint32_t days)
std::cerr << "Setting HashCache duration to " << days << std::endl;
#endif
hashCache.setRememberHashFilesDuration(days) ;
hashCache.clean() ;
}
uint32_t FileIndexMonitor::rememberHashFilesDuration() const
@ -254,6 +253,7 @@ void HashCache::clean()
++tmp ;
_files.erase(it) ;
it=tmp ;
_changed = true ;
}
else
++it ;
@ -823,8 +823,11 @@ void FileIndexMonitor::updateCycle()
mInCheck = false;
if(useHashCache)
{
hashCache.clean() ;
hashCache.save() ;
}
}
}
static std::string friendlyUnit(uint64_t val)