initialize method
void
initialize({})
Initialize the CacheManager with custom configuration
cacheKey - Unique key for the cache
stalePeriod - Duration before a cache object is considered stale
maxNrOfCacheObjects - Maximum number of objects to keep in cache
Implementation
void initialize({
String cacheKey = _key,
Duration stalePeriod = _stalePeriod,
int maxNrOfCacheObjects = _maxNrOfCacheObjects,
}) {
// Store config for lazy initialization
_configCacheKey = cacheKey;
_configStalePeriod = stalePeriod;
_configMaxCacheObjects = maxNrOfCacheObjects;
// Only actually initialize if explicitly called
_performInitialization();
}