Class DefaultLookupCache.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • expireAfterAccess

        public DefaultLookupCache.Builder expireAfterAccess​(Duration duration)
        Specifies the duration after an entry is last accessed that it should be automatically removed.
      • expireAfterWrite

        public DefaultLookupCache.Builder expireAfterWrite​(Duration duration)
        Specifies the duration after an entry is created that it should be automatically removed.
      • maximumSize

        public DefaultLookupCache.Builder maximumSize​(long maximumSize)
        Specifies the maximum number of entries of the cache.
      • cacheMissingKey

        public DefaultLookupCache.Builder cacheMissingKey​(boolean cacheMissingKey)
        Specifies whether to cache empty value into the cache.

        Please note that "empty" means a collection without any rows in it instead of null. The cache will not accept any null key or value.