Package io.quarkus.cache.runtime
Class CacheConfig.CaffeineConfig.CaffeineNamespaceConfig
- java.lang.Object
-
- io.quarkus.cache.runtime.CacheConfig.CaffeineConfig.CaffeineNamespaceConfig
-
- Enclosing class:
- CacheConfig.CaffeineConfig
public static class CacheConfig.CaffeineConfig.CaffeineNamespaceConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field 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.boolean
metricsEnabled
Whether or not metrics are recorded if the application depends on the Micrometer extension.
-
Constructor Summary
Constructors Constructor Description CaffeineNamespaceConfig()
-
-
-
Field Detail
-
initialCapacity
@ConfigItem public 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
@ConfigItem public 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
@ConfigItem public 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
@ConfigItem public 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.
-
metricsEnabled
@ConfigItem public boolean metricsEnabled
Whether or not metrics are recorded if the application depends on the Micrometer extension. Setting this value totrue
will enable the accumulation of cache stats inside Caffeine.
-
-