Baseflow / Baseflow/flutter_cache_manager

Publishing custom cache manager implementation best practices

Ouverte
#209 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Dart
Étoiles
809
Forks
510
Merge moyen
6 min
PR mergées (30 j)
1

Description

## 💬 Questions and Help

**Background**: I extended `BaseCacheManager` to create a custom cache that uses [Firebase Performance](https://pub.dev/packages/firebase_performance) to trace HTTP network requests.

Implementation wise, it's very simple: Just like [DefaultCacheManager](https://github.com/Baseflow/flutter_cache_manager/blob/28b8d182d3de8e4e9ce6edaca8e85ad15d052d21/flutter_cache_manager/lib/src/cache_manager.dart#L30) with a custom [FileService](https://github.com/Baseflow/flutter_cache_manager/blob/28b8d182d3de8e4e9ce6edaca8e85ad15d052d21/flutter_cache_manager/lib/src/web/file_service.dart#L21) class that traces requests inside `get(...)`. It uses the `firebase_performance` sdk to create the traces, just a few lines of code.

I am considering publishing this as a pub package. This would help alleviate some common issues and feature requests for Firebase Performance related to automatic network tracing.

**Question**: Are there any best practices for publishing a custom cache manager implementation as a pub package? Are there examples of other published cache manager implementations?

Specifically, I'm looking for:
- Package naming convention to imply its builds off of this package
- How to show it works with `cached_network_image`, or any other package that uses `flutter_cache_manager` under the hood
- If there is some wiki page that contains all known custom cache implementations that I should add it to

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with the referenced cache_manager.dart and web/file_service.dart examples, then review the repository's existing documentation and package guidance. Done would require a documented answer covering package naming, compatibility with cached_network_image or other consumers, and where custom implementations should be listed.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
dart, firebase, flutter
Domaine
documentation
Type d'issue
Documentation
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.