Trim cache after set query request 98/272598/3
authorIlho Kim <ilho159.kim@samsung.com>
Mon, 21 Mar 2022 08:51:12 +0000 (17:51 +0900)
committerIlho Kim <ilho159.kim@samsung.com>
Mon, 21 Mar 2022 09:09:22 +0000 (18:09 +0900)
After the write query request is completed
the cache value and database value are different
there is a need to call trim cache directrly after excuting write query

Change-Id: Icc7f87fa60c372fad7df6e31df4ae5055d36419d
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/server/database/query_handler.cc

index a67e16d..d450751 100644 (file)
@@ -20,6 +20,7 @@
 #include <vector>
 
 #include "utils/logging.hh"
+#include "db_handle_provider.hh"
 
 #include "pkgmgrinfo_debug.h"
 #include "pkgmgrinfo_internal.h"
@@ -298,6 +299,7 @@ int QueryHandler::Execute() {
       }
     }
     __free_query_list(queries, args_list);
+    database::DBHandleProvider::GetInst(GetUID()).TrimCache();
     return ret;
   }
   return ret;