diff --git a/src/Cache.cpp b/src/Cache.cpp index 01b62e3a6..85fd6f2bd 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -398,6 +398,7 @@ size_t Cache::getCurrentCacheSize() const void Cache::reset() { + boost::unique_lock s(lru_mutex); m_lru.clear(); lru.clear(); @@ -408,6 +409,7 @@ void Cache::reset() for (dir = bf::directory_iterator(journalPrefix); dir != dend; ++dir) bf::remove_all(dir->path()); + currentCacheSize = 0; } /* The helper classes */