public static class FlagsmithCacheConfig.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
FlagsmithCacheConfig |
build() |
FlagsmithCacheConfig.Builder |
expireAfterAccess(int duration,
TimeUnit timeUnit)
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.
|
FlagsmithCacheConfig.Builder |
expireAfterWrite(int duration,
TimeUnit timeUnit)
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.
|
FlagsmithCacheConfig.Builder |
maxSize(int maxSize)
Specifies the maximum number of entries the cache may contain.
|
FlagsmithCacheConfig.Builder |
recordStats()
Enables the accumulation of CacheStats during the operation of the cache.
|
public FlagsmithCacheConfig.Builder expireAfterWrite(int duration, TimeUnit timeUnit)
duration - an integer matching the time unit.timeUnit - minutes, seconds, etc.public FlagsmithCacheConfig.Builder expireAfterAccess(int duration, TimeUnit timeUnit)
duration - an integer matching the time unit.timeUnit - minutes, seconds, etc.public FlagsmithCacheConfig.Builder maxSize(int maxSize)
maxSize - size. When size is zero, elements will be evicted immediately after being loaded into the cache.
This can be useful in testing, or to disable caching temporarily without a code change.public FlagsmithCacheConfig.Builder recordStats()
public FlagsmithCacheConfig build()
Copyright © 2021. All rights reserved.