clearCache method

  1. @override
Future<void> clearCache()
override

Implementation

@override
Future<void> clearCache() async {
  await _roomsBox.deleteAll(_roomsBox.keys);
  await _accountDataBox.deleteAll(_accountDataBox.keys);
  await _roomStateBox.deleteAll(_roomStateBox.keys);
  await _roomMembersBox.deleteAll(_roomMembersBox.keys);
  await _eventsBox.deleteAll(_eventsBox.keys);
  await _timelineFragmentsBox.deleteAll(_timelineFragmentsBox.keys);
  await _outboundGroupSessionsBox.deleteAll(_outboundGroupSessionsBox.keys);
  await _presencesBox.deleteAll(_presencesBox.keys);
  await _clientBox.delete('prev_batch');
}