Package growthbook.sdk.java.sandbox
Class FileCachingManagerImpl
java.lang.Object
growthbook.sdk.java.sandbox.FileCachingManagerImpl
- All Implemented Interfaces:
- GbCacheManager
Class responsible for caching data to a file
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidClears all cache files in the directoryMethod that fetches data from cache by file namevoidsaveContent(String fileName, String content) Method that saves feature JSON as String to a cache file
- 
Constructor Details- 
FileCachingManagerImpl
 
- 
- 
Method Details- 
saveContentMethod that saves feature JSON as String to a cache file- Specified by:
- saveContentin interface- GbCacheManager
- Parameters:
- fileName- The name of file in the cache directory
- content- Feature JSON as String type
 
- 
loadCacheMethod that fetches data from cache by file name- Specified by:
- loadCachein interface- GbCacheManager
- Parameters:
- fileName- The name of the file in the cache directory.
- Returns:
- The cached data as a String.
 
- 
clearCachepublic void clearCache()Clears all cache files in the directory- Specified by:
- clearCachein interface- GbCacheManager
 
 
-