From de1d849d144166efb1543c5b08bad23d5ec16e9e Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Tue, 26 Mar 2019 14:04:28 -0500 Subject: [PATCH] Fixed Cache::reset() --- src/Cache.cpp | 2 ++ 1 file changed, 2 insertions(+) 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 */