From ded17071518f19335a8825d28c1d53a2ba16e88b Mon Sep 17 00:00:00 2001 From: csoler Date: Sat, 5 Nov 2011 22:31:45 +0000 Subject: [PATCH] improved behavior of hash cache git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4663 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/fimonitor.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/dbase/fimonitor.cc b/libretroshare/src/dbase/fimonitor.cc index 8a9c88201..060cb9825 100644 --- a/libretroshare/src/dbase/fimonitor.cc +++ b/libretroshare/src/dbase/fimonitor.cc @@ -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,7 +823,10 @@ void FileIndexMonitor::updateCycle() mInCheck = false; if(useHashCache) + { + hashCache.clean() ; hashCache.save() ; + } } }