dart-lang / http

A composable API for making HTTP requests in Dart.
https://pub.dev/packages/http
BSD 3-Clause "New" or "Revised" License
1.02k stars 354 forks source link

Add caching support #334

Open klavergne opened 5 years ago

klavergne commented 5 years ago

Caching responses on the client side is a fundamental part of HTTP functionality. While there are other packages that support this, it seems like this should be a basic part of this package. Since this package is meant to be a basic Dart package, perhaps providing an interface that can be implemented for different Dart-based systems (server, Javascript, Flutter, etc.) based on the features of those frameworks.

MelbourneDeveloper commented 2 years ago

@klavergne just an assumption here, but I'm guessing that you are talking about setting up a cache that honour these headers, is that right? https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

klavergne commented 2 years ago

Yes, that's correct.

MelbourneDeveloper commented 2 years ago

@klavergne are you able to point to implementations in other languages that work well?