Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Disable caching in debug mode #884

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

valentinallavayol
Copy link
Contributor

@valentinallavayol valentinallavayol commented Jun 19, 2023

The toolkit is currently using hydrated bloc to persist the state of certain BLoCs across app restarts or crashes.
Modified caching behavior so as to disable it in debug mode, so developers don't have to worry about seeing cached data vs fresh data.

In order to enable it, the following code must be removed from the bootstrap.dart file:

if (kDebugMode) {
    await HydratedBloc.storage.clear();
}

Description

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

@valentinallavayol valentinallavayol merged commit 16b5905 into main Jun 28, 2023
@valentinallavayol valentinallavayol deleted the feat/disable-debug-caching branch June 28, 2023 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants