Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/search
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-10-18 03:19:11 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:45:46 +0300
commit20e3ed17587e837ee6199010c28440584d7682bc (patch)
treeabacac5ad843eddc565b3520d46dd88627487db5 /search
parentb02b5b055f96843579fd054e4eafe36607058a50 (diff)
Do correct and full cache clearing (for Index and search::Engine).
Diffstat (limited to 'search')
-rw-r--r--search/search_engine.cpp8
-rw-r--r--search/search_engine.hpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/search/search_engine.cpp b/search/search_engine.cpp
index 33ebc572bb..50465cb20f 100644
--- a/search/search_engine.cpp
+++ b/search/search_engine.cpp
@@ -346,10 +346,12 @@ void Engine::ClearViewportsCache()
m_pQuery->ClearCaches();
}
-void Engine::ClearCaches()
+void Engine::ClearAllCaches()
{
- /// @todo Add m_pData->m_infoGetter clearing routine.
- /// Now we have prereserved cache size.
+ threads::MutexGuard guard(m_searchMutex);
+
+ m_pQuery->ClearCaches();
+ m_pData->m_infoGetter.ClearCaches();
}
} // namespace search
diff --git a/search/search_engine.hpp b/search/search_engine.hpp
index 380aee2965..fc7feff073 100644
--- a/search/search_engine.hpp
+++ b/search/search_engine.hpp
@@ -56,7 +56,7 @@ public:
m2::RectD GetCountryBounds(string const & file) const;
void ClearViewportsCache();
- void ClearCaches();
+ void ClearAllCaches();
private:
static const int RESULTS_COUNT = 15;