Using Cache API with gzipped R2 object
Hi!
I am trying to use the Cache API for a response that contains a gzip encoded html file (persisted in R2) as the response body.
The Worker uses a custom domain.
The problem is, when trying to return the body as a
ReadableStream
(see code below), cache match stops returning anything and the full code evaluates every time.
I have verified that the Cache works as expected when I decompress the body before returning it as the response body.
The code looks roughly like this (some business logic removed for brevity):
0 Replies