Baseflow / Baseflow/flutter_cache_manager
Proposal to support all platforms (including web) while emulating browser caching behavior
- Lenguaje dominante
- Dart
- Estrellas
- 809
- Forks
- 510
- Merge medio
- 6 min
- PR fusionados (30 d)
- 1
Descripción
## 🏗 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
Guía de contribución
Línea de trabajo
Start by reading the linked http_get_cache project and the proposal's references to Drift, sqflite, and fetch_client. Compare the intended Cache-Control, ETag, Last-Modified, revalidation, eviction, and platform-storage behavior, then verify that the native and web platforms are covered by tests for the expected browser behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- dart, flutter
- Área
- databases, mobile-dev, web-dev
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 22/100