Package com.google.gerrit.server.cache

Examples of com.google.gerrit.server.cache.CacheModule


      bind(Resolver.class);
      bind(UploadFactory.class);
      bind(UploadFilter.class);
      bind(ReceiveFactory.class);
      bind(ReceiveFilter.class);
      install(new CacheModule() {
        @Override
        protected void configure() {
          cache(ID_CACHE,
              AdvertisedObjectsCacheKey.class,
              new TypeLiteral<Set<ObjectId>>() {})
View Full Code Here


public final class CacheBasedWebSession implements WebSession {
  private static final String ACCOUNT_COOKIE = "GerritAccount";
  static final long MAX_AGE_MINUTES = HOURS.toMinutes(12);

  public static Module module() {
    return new CacheModule() {
      @Override
      protected void configure() {
        persist(WebSessionManager.CACHE_NAME, String.class, Val.class)
            .maximumWeight(1024) // reasonable default for many sites
            .expireAfterWrite(MAX_AGE_MINUTES, MINUTES) // expire sessions if they are inactive
View Full Code Here

TOP

Related Classes of com.google.gerrit.server.cache.CacheModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.