Baseflow / Baseflow/flutter_cache_manager

Publishing custom cache manager implementation best practices

未关闭
#209 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Dart
星标
809
派生
510
平均合并
6 分钟
30 天内合并 PR
1

描述

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

贡献指南

打开贡献指南

调研方向

先从所引用的 cache_manager.dart 和 web/file_service.dart 示例开始,然后查看 repository 现有的文档和 package 指南。完成的标准是提供一份文档化的答案,涵盖 package 命名、与 cached_network_image 或其他使用方的兼容性,以及应在哪里列出自定义实现。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart, firebase, flutter
领域
documentation
Issue 类型
文档
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。