public interface FlagsmithCache
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
Performs any pending maintenance operations needed by the cache.
|
long |
estimatedSize()
Returns the approximate number of entries in this cache.
|
com.github.benmanes.caffeine.cache.Cache<String,Flags> |
getCache()
Returns the Cache instance.
|
String |
getEnvFlagsCacheKey()
Returns the environment level flags/traits cache key.
|
Flags |
getIfPresent(String key)
Returns the value associated with key in this cache, or null if there is no cached value for
key.
|
void |
invalidate(String userId)
Discards any cached value for key userId.
|
void |
invalidateAll()
Discards all entries in the cache.
|
com.github.benmanes.caffeine.cache.stats.CacheStats |
stats()
Returns a current snapshot of this cache's cumulative statistics.
|
void cleanUp()
void invalidateAll()
void invalidate(String userId)
userId - an id of the userlong estimatedSize()
com.github.benmanes.caffeine.cache.stats.CacheStats stats()
Flags getIfPresent(String key)
key - a key to retrieve value forString getEnvFlagsCacheKey()
Flags for users are stored in the cache using the user-identifier as the cache key.
For environment level flags, you need to configure a key with the builder to enable caching environment flags.
This method returns the key you configured with the builder.
Copyright © 2022. All rights reserved.