clear method

DataLoader<K, V, C> clear(
  1. K key
)

Clears the value at key from the cache, if it exists. Returns itself for method chaining.

Implementation

DataLoader<K, V, C> clear(K key) {
  final cacheMap = this._cacheMap;
  if (cacheMap != null) {
    final cacheKey = this._cacheKeyFn(key);
    cacheMap.delete(cacheKey);
  }
  return this;
}