-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache API tests #447
Cache API tests #447
Conversation
|
74d77be
to
7790ee2
Compare
@@ -246,7 +253,8 @@ export class CacheGateway { | |||
throw new StorageFailure(); | |||
} | |||
|
|||
await this.storage.put<CacheMetadata>(request.url, { | |||
cacheKey ??= request.url; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever
7790ee2
to
15ffc9b
Compare
This PR adds testing for Miniflare 3's Cache API. I've written these as integration tests. Along the way, I fixed some bugs with caching streamed responses, and using
cf.cacheKey
.This PR is pretty big, because it also adds lots of the required integration testing infrastructure. Hopefully, it should be easier to add tests for other features after this.