getValue<T> static method

T getValue<T>(
  1. String key,
  2. 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.


static T getValue<T>(String key, T defaultValue) {
  assert(key != null);
  if (_cacheProvider.containsKey(key)) {
    return _cacheProvider.getValue<T>(key, defaultValue);
  return defaultValue;