clear method

  1. @override
void clear()
override

Remove all keys from the cache and notify listeners.

Implementation

@override
void clear() {
  _cache.clear();
  for (final timer in _timers.keys) {
    _timers[timer]?.cancel();
    _timers.remove(timer);
  }
  _notifyListeners();
}