Baseflow / Baseflow/flutter_cache_manager

Publishing custom cache manager implementation best practices

Đang mở
#209 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Dart
Star
809
Fork
510
Merge trung bình
6 phút
Pull request đã merge (30 ngày)
1

Mô tả

## 💬 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với các ví dụ được tham chiếu trong cache_manager.dart và web/file_service.dart, sau đó xem lại tài liệu hiện có của repository và hướng dẫn về package. Công việc được xem là hoàn tất khi có câu trả lời được ghi chép, bao quát việc đặt tên package, khả năng tương thích với cached_network_image hoặc các bên sử dụng khác, và nơi các triển khai tùy chỉnh nên được liệt kê.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart, firebase, flutter
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.