Class PersistentCacheBaseFactory

  • All Implemented Interfaces:
    PersistentCacheFactory

    public abstract class PersistentCacheBaseFactory
    extends Object
    implements PersistentCacheFactory
    Base class for persistent cache factory. If the cache.directory property is unset, or disk limit is zero or negative, it will fall back to in-memory only caches.
    • Field Detail

      • cacheDir

        protected final Path cacheDir
      • diskEnabled

        protected boolean diskEnabled
      • config

        protected final org.eclipse.jgit.lib.Config config
    • Constructor Detail

      • PersistentCacheBaseFactory

        public PersistentCacheBaseFactory​(MemoryCacheFactory memCacheFactory,
                                          org.eclipse.jgit.lib.Config config,
                                          SitePaths site)
    • Method Detail

      • buildImpl

        protected abstract <K,​V> com.google.common.cache.Cache<K,​V> buildImpl​(PersistentCacheDef<K,​V> in,
                                                                                          long diskLimit)
      • buildImpl

        protected abstract <K,​V> com.google.common.cache.LoadingCache<K,​V> buildImpl​(PersistentCacheDef<K,​V> in,
                                                                                                 com.google.common.cache.CacheLoader<K,​V> loader,
                                                                                                 long diskLimit)