Package growthbook.sdk.java.sandbox
Interface GbCacheManager
- All Known Implementing Classes:
FileCachingManagerImpl,InMemoryCachingManagerImpl
public interface GbCacheManager
-
Method Summary
Modifier and TypeMethodDescriptionvoiddefault LongReturns when the cached value was last updated, in epoch milliseconds.voidsaveContent(String key, String data)
-
Method Details
-
saveContent
-
loadCache
-
clearCache
void clearCache() -
getLastUpdatedMillis
Returns when the cached value was last updated, in epoch milliseconds.The optional background feature refresh interval uses this timestamp to decide whether cached features are fresh enough to skip a network refresh. Custom cache implementations may return
nullwhen timestamp tracking is unsupported or when the key does not exist; in that case the SDK treats cache freshness as unknown and performs the network refresh. Implementations should throwFeatureCacheExceptionfor real cache access failures.
-