clear method

Future<void> clear()

Limpia caché (para testing)

Implementation

Future<void> clear() async {
  _cachedTexts = null;
  _cachedRules = null;
  _isFetchingTexts = false;
  _isFetchingRules = false;

  try {
    await ObslyStorage.instance.storeInternalState(_textsKey, null);
    await ObslyStorage.instance.storeInternalState(_textsTimestampKey, null);
    await ObslyStorage.instance.storeInternalState(_rulesKey, null);
    await ObslyStorage.instance.storeInternalState(_rulesTimestampKey, null);
  } catch (e) {
    ObslyLogger.error('Error clearing obsly tools cache: $e');
  }
}