CachePatternMatcher: Adapt the code to removal of account caches

accounts_byemail cache was removed in I3a4279f5ab and accounts_byname
cache was removed in I5285dbdf110.

Change-Id: Ide8b25abd1bb821fd2fc7e4b60327d919d79c15e
diff --git a/src/main/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcher.java b/src/main/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcher.java
index cab8f58..27cb5c2 100644
--- a/src/main/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcher.java
+++ b/src/main/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcher.java
@@ -27,7 +27,7 @@
 class CachePatternMatcher {
   private static final List<String> DEFAULT_PATTERNS =
       ImmutableList.of(
-          "^accounts.*", "^groups.*", "ldap_usernames", "projects", "sshkeys", "web_sessions");
+          "accounts", "^groups.*", "ldap_usernames", "projects", "sshkeys", "web_sessions");
 
   private final Pattern pattern;
 
diff --git a/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcherTest.java b/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcherTest.java
index 9093238..03c1928 100644
--- a/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcherTest.java
+++ b/src/test/java/com/ericsson/gerrit/plugins/highavailability/cache/CachePatternMatcherTest.java
@@ -38,8 +38,6 @@
     for (String cache :
         ImmutableList.of(
             "accounts",
-            "accounts_byemail",
-            "accounts_byname",
             "groups",
             "groups_byinclude",
             "groups_byname",
diff --git a/src/test/java/com/ericsson/gerrit/plugins/highavailability/forwarder/CacheEntryTest.java b/src/test/java/com/ericsson/gerrit/plugins/highavailability/forwarder/CacheEntryTest.java
index 5cdcf5a..a9bcfd7 100644
--- a/src/test/java/com/ericsson/gerrit/plugins/highavailability/forwarder/CacheEntryTest.java
+++ b/src/test/java/com/ericsson/gerrit/plugins/highavailability/forwarder/CacheEntryTest.java
@@ -16,19 +16,13 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
-import com.ericsson.gerrit.plugins.highavailability.cache.Constants;
 import org.junit.Test;
 
 public class CacheEntryTest {
 
   @Test
   public void cacheEntry() throws Exception {
-    CacheEntry entry = CacheEntry.from("accounts_by_name", "someKey");
-    assertThat(entry.getPluginName()).isEqualTo(Constants.GERRIT);
-    assertThat(entry.getCacheName()).isEqualTo("accounts_by_name");
-    assertThat(entry.getKey()).isEqualTo("someKey");
-
-    entry = CacheEntry.from("my_plugin.my_cache", "someOtherKey");
+    CacheEntry entry = CacheEntry.from("my_plugin.my_cache", "someOtherKey");
     assertThat(entry.getPluginName()).isEqualTo("my_plugin");
     assertThat(entry.getCacheName()).isEqualTo("my_cache");
     assertThat(entry.getKey()).isEqualTo("someOtherKey");