getValue method

E getValue(
  1. P param
)

Implementation

E getValue(P param) {
  if (cache.containsKey(param)) {
    return cache[param]!;
  }
  final v = callback(param);
  if (cache.length >= cacheSize) {
    cache.clear();
  }
  cache[param] = v;
  return v;
}