mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
fa690de1d6
commit
ded1707151
@ -85,7 +85,6 @@ void FileIndexMonitor::setRememberHashFilesDuration(uint32_t days)
|
|||||||
std::cerr << "Setting HashCache duration to " << days << std::endl;
|
std::cerr << "Setting HashCache duration to " << days << std::endl;
|
||||||
#endif
|
#endif
|
||||||
hashCache.setRememberHashFilesDuration(days) ;
|
hashCache.setRememberHashFilesDuration(days) ;
|
||||||
hashCache.clean() ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t FileIndexMonitor::rememberHashFilesDuration() const
|
uint32_t FileIndexMonitor::rememberHashFilesDuration() const
|
||||||
@ -254,6 +253,7 @@ void HashCache::clean()
|
|||||||
++tmp ;
|
++tmp ;
|
||||||
_files.erase(it) ;
|
_files.erase(it) ;
|
||||||
it=tmp ;
|
it=tmp ;
|
||||||
|
_changed = true ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
++it ;
|
++it ;
|
||||||
@ -823,9 +823,12 @@ void FileIndexMonitor::updateCycle()
|
|||||||
mInCheck = false;
|
mInCheck = false;
|
||||||
|
|
||||||
if(useHashCache)
|
if(useHashCache)
|
||||||
|
{
|
||||||
|
hashCache.clean() ;
|
||||||
hashCache.save() ;
|
hashCache.save() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static std::string friendlyUnit(uint64_t val)
|
static std::string friendlyUnit(uint64_t val)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user