invalidate method

void invalidate()

Invalidates the cache, forcing recomputation on next validate call.

final cached = emailRule.cached();
cached.validate('test@example.com'); // Computed
cached.validate('test@example.com'); // Cached
cached.invalidate();
cached.validate('test@example.com'); // Computed again

Implementation

void invalidate() {
  _hasValidated = false;
  _lastResult = null;
  _lastValue = null;
}