Move default memory cache implementation out of H2 package

The memory cache doesn't depend on H2 at all, and this separation of
packages makes it harder to reintroduce the kind of source-level
dependency that was removed in I570fd54adf.

Change-Id: Ie23e39cd7ea9a0813a914e65614b889c248342ae
This commit is contained in:
Dave Borowitz
2018-05-08 21:24:24 +02:00
committed by David Pursehouse
parent 5517ec316f
commit a3cc510fc1
13 changed files with 94 additions and 37 deletions

View File

@@ -35,7 +35,8 @@ import com.google.gerrit.server.LibModuleLoader;
import com.google.gerrit.server.StartupChecks;
import com.google.gerrit.server.account.InternalAccountDirectory;
import com.google.gerrit.server.cache.CacheOverrides;
import com.google.gerrit.server.cache.h2.DefaultCacheFactory;
import com.google.gerrit.server.cache.h2.H2CacheModule;
import com.google.gerrit.server.cache.mem.DefaultMemoryCacheModule;
import com.google.gerrit.server.change.ChangeCleanupRunner;
import com.google.gerrit.server.config.AuthConfig;
import com.google.gerrit.server.config.AuthConfigModule;
@@ -319,8 +320,8 @@ public class WebAppInitializer extends GuiceServletContextListener implements Fi
modules.add(cfgInjector.getInstance(GerritGlobalModule.class));
modules.add(new SearchingChangeCacheImpl.Module());
modules.add(new InternalAccountDirectory.Module());
modules.add(new DefaultCacheFactory.MemoryCacheModule());
modules.add(new DefaultCacheFactory.PersistentCacheModule());
modules.add(new DefaultMemoryCacheModule());
modules.add(new H2CacheModule());
modules.add(cfgInjector.getInstance(MailReceiver.Module.class));
modules.add(new SmtpEmailSender.Module());
modules.add(new SignedTokenEmailTokenVerifier.Module());