Change the regeration timing after all cache remove
[platform/core/appfw/pkgmgr-info.git] / src / server / runner.cc
index 2d29a93..7c18adb 100644 (file)
@@ -89,10 +89,6 @@ int Runner::OnReceiveRequest(int fd, GIOCondition cond, void* user_data) {
 
   auto req = std::make_shared<PkgRequest>(client_fd);
 
-  if (CacheFlag::SetPreparing()) {
-    runner->QueueRequest(
-        std::make_shared<CreateCacheRequest>(runner->default_uid_, runner));
-  }
   runner->QueueRequest(std::move(req));
 
   return G_SOURCE_CONTINUE;
@@ -101,6 +97,7 @@ int Runner::OnReceiveRequest(int fd, GIOCondition cond, void* user_data) {
 void Runner::OnChanged(const std::string& locale) {
   thread_pool_->SetLocale(locale);
   QueueRequest(std::make_shared<RemoveAllCacheRequest>(default_uid_));
+  SetCreateCacheTimer();
 }
 
 void Runner::OnDbChanged() {