Package io.quarkus.cache.runtime
Interface CacheConfig.CaffeineConfig.CaffeineCacheConfig
-
- Enclosing interface:
- CacheConfig.CaffeineConfig
public static interface CacheConfig.CaffeineConfig.CaffeineCacheConfig
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<Duration>
expireAfterAccess()
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.Optional<Duration>
expireAfterWrite()
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.OptionalInt
initialCapacity()
Minimum total size for the internal data structures.OptionalLong
maximumSize()
Maximum number of entries the cache may contain.Optional<Boolean>
metricsEnabled()
Whether or not metrics are recorded if the application depends on the Micrometer extension.
-
-
-
Method Detail
-
initialCapacity
OptionalInt initialCapacity()
Minimum total size for the internal data structures. Providing a large enough estimate at construction time avoids the need for expensive resizing operations later, but setting this value unnecessarily high wastes memory.
-
maximumSize
OptionalLong maximumSize()
Maximum number of entries the cache may contain. Note that the cache may evict an entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the cache size grows close to the maximum, the cache evicts entries that are less likely to be used again. For example, the cache may evict an entry because it hasn't been used recently or very often.
-
expireAfterWrite
Optional<Duration> expireAfterWrite()
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, or the most recent replacement of its value.
-
expireAfterAccess
Optional<Duration> expireAfterAccess()
Specifies that each entry should be automatically removed from the cache once a fixed duration has elapsed after the entry's creation, the most recent replacement of its value, or its last read.
-
-