Fix cache Settings

* Remove Weigher implementation because the default behaviour already
does the same thing.

Solves: Jira GER-1674
Change-Id: I51a20808c7a00784ab366f684faa220e942cb2cd
diff --git a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/cache/EiffelEventIdCacheImpl.java b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/cache/EiffelEventIdCacheImpl.java
index 5377521..fa7d622 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/cache/EiffelEventIdCacheImpl.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/eventseiffel/cache/EiffelEventIdCacheImpl.java
@@ -19,7 +19,6 @@
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
-import com.google.common.cache.Weigher;
 import com.google.gerrit.server.cache.CacheModule;
 import com.google.inject.Inject;
 import com.google.inject.Module;
@@ -53,7 +52,6 @@
         persist(CACHE_NAME, EventKey.class, new TypeLiteral<Optional<UUID>>() {})
             .maximumWeight(maxNbrOfEntries)
             .loader(EventLoader.class)
-            .weigher(CountWeigher.class)
             .keySerializer(new EventKeySerializer())
             .valueSerializer(new UUIDSerializer());
         bind(EiffelEventIdCacheImpl.class).asEagerSingleton();
@@ -155,12 +153,4 @@
       return es.getEventId(key);
     }
   }
-
-  static class CountWeigher implements Weigher<EventKey, Optional<UUID>> {
-
-    @Override
-    public int weigh(EventKey key, Optional<UUID> value) {
-      return 1;
-    }
-  }
 }