set method

  1. @override
bool set(
  1. K k,
  2. V v
)
override

Set value in cache, if the value is present it will be overwritten Returns true when element is overwritten otherwise false

Implementation

@override
bool set(K k, V v) {
  final result = _cache.containsKey(k);

  _cache[k] = v;

  return result;
}