Baseflow / Baseflow/flutter_cache_manager
Proposal to support all platforms (including web) while emulating browser caching behavior
- 主要言語
- Dart
- スター
- 809
- フォーク
- 510
- 平均マージ
- 6分
- マージ済み PR(30日)
- 1
説明
## 🏗 Enhancement Proposal
I recently was able to support all native platforms and web with an emulation of how the browser works with saving, revalidating and evicting cache.
https://github.com/rodydavis/http_get_cache
The goal is to support the same way the browser does caching:
- Cache-Control, eTag, Last-Modified headers
- max-age, stale-while-revalidate, stale-if-error, only-if-cached
- Support fetching content updates with head requests for non immutable objects and only after stale and 304 response meaning no update
- Support skipping cache with request headers: no-cache
- Support preventing storing with: no-store
- Use platform cache directory for stored files and database in documents
### Pitch
- Update core logic to use Drift instead of sqflite to support all native platforms
- Web will use the fetch_client package and work with browser caching
- New http client for wrapping network requests
- Add tests to test for expected browser behavior
### Platforms affected (mark all that apply)
- [X] :iphone: iOS
- [X] :robot: Android
- [+] MacOS
- [+] Windows
- [+] Linux
- [+] Web
- [+] Dart native
コントリビューションガイド
調査の方向性
まず、リンクされている http_get_cache プロジェクトと、提案における Drift、sqflite、fetch_client への参照を読みます。Cache-Control、ETag、Last-Modified、再検証、削除、およびプラットフォームストレージについて意図された動作を比較し、そのうえで、ネイティブプラットフォームと Web プラットフォームが、期待されるブラウザー動作を対象とするテストでカバーされていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter
- 領域
- databases, mobile-dev, web-dev
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 22/100