purge method

void purge()

Drops every request and leaves one marker with no path, query, header, body or principal. A request that was in flight is not recorded when it settles. Called when the identity changes, so one user's requests are not readable by the next.

Implementation

void purge() {
  clear();
  _push(
    _Live(
        id: -1,
        operation: 'principal changed',
        method: '',
        args: '',
        at: _clock.now(),
        limit: 0,
        marker: true,
      )
      ..outcome = RequestOutcome.ok
      ..attempts = 0,
  );
}