envoyproxy / envoyproxy/envoy-mobile
Cronvoy: support HTTP caching
- Dominant language
- Java
- Stars
- 566
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
The public [Cronet API offers HTTP caching](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/CronetEngine.java;l=213), with following options:
- [HTTP_CACHE_DISABLED](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/CronetEngine.java;l=187)
- [HTTP_CACHE_IN_MEMORY](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/CronetEngine.java;l=193)
- [HTTP_CACHE_DISK_NO_HTTP](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/CronetEngine.java;l=199): use to cache QUIC hints, mainly.
- [HTTP_CACHE_DISK](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/CronetEngine.java;l=206)
The Cronet Public API also reports if the cache was used to return the response: [```UrlResponseInfo.wasCached()```](https://source.chromium.org/chromium/chromium/src/+/main:components/cronet/android/api/src/org/chromium/net/UrlResponseInfo.java;l=83). An Envoy Mobile callback must somehow provide this info.
This feature is used actively by some Android Apps developed by Google:
- [Duo](https://play.google.com/store/apps/details?id=com.google.android.apps.tachyon&hl=en_GB&gl=US): disk caching, if not available, then a much smaller in memory cache
- [AGSA, a. k.a. Google Search](https://play.google.com/store/apps/details?id=com.google.android.googlequicksearchbox&hl=en_GB&gl=US): disk caching, if not available, then a much smaller in memory cache
- [Meet for Enterprise](https://workspace.google.com/intl/en_uk/products/meet): in memory cache, also using QUIC and gRPC
- and more internal Google Apps
It seems reasonable to assume that other Android App Developers also use HTTP caching. Looks like that it is imperative to keep supporting this feature. This is not a trivial feature.
Contributor guide
Assessment
This issue has not been assessed yet.