Merge "Fix FloggerArgumentToString bug pattern flagged by error prone"
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/DeleteRemote.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/DeleteRemote.java
index 408b092..1a25401 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/DeleteRemote.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/DeleteRemote.java
@@ -61,7 +61,7 @@
       wh.commit(md);
     }
 
-    projectCache.evict(rsrc.getProject());
+    projectCache.evictAndReindex(rsrc.getProject());
 
     return Response.none();
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/UpsertRemote.java b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/UpsertRemote.java
index 56d2836..089d4e6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/UpsertRemote.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/webhooks/rest/UpsertRemote.java
@@ -129,7 +129,7 @@
       wh.commit(md);
     }
 
-    projectCache.evict(project);
+    projectCache.evictAndReindex(project);
 
     Config cfg = configFactory.getProjectPluginConfigWithInheritance(project, pluginName);
     RemoteConfig rc = remoteConfigFactory.create(cfg, remoteName);