getValue<T> static method
- String key,
- T defaultValue
method to get a value using the cacheProvider
for given key
If there's no value found associated with the key
then the defaultValue
is returned.
Implementation
static T getValue<T>(String key, T defaultValue) {
ensureCacheProvider();
assert(key != null);
if (_cacheProvider.containsKey(key)) {
return _cacheProvider.getValue<T>(key, defaultValue);
}
return defaultValue;
}