remove method

bool remove(
  1. T value
)

Removes a specific value from the cache.

Returns true if the value was in the cache.

final cached = emailRule.lruCached();
cached.validate('a@example.com');
cached.remove('a@example.com'); // Returns true
cached.remove('b@example.com'); // Returns false (not in cache)

Implementation

bool remove(T value) {
  if (_cache.containsKey(value)) {
    _cache.remove(value);
    _accessOrder.remove(value);
    return true;
  }
  return false;
}