Baseflow / Baseflow/flutter_cache_manager

Publishing custom cache manager implementation best practices

Open
#209 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
809
Forks
510
Avg merge
6m
Merged PRs (30d)
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.