-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Summary
As a consumer of an API, I would like the service to publish appropriate cache headers, so that I can leverage caches & minimize resources.
Notes
MongoDB's automatic document versioning seems like a perfect fit for the ETag header. Sophisticated API clients could leverage that by including appropriate If-None-Match headers in their requests.
This should also allow for more effective caching at the server level. Should be able to drop in caching proxies between the API and its clients to reduce load.
Acceptance Criteria
- GET requests without an
If-None-Matchheader should include an ETag in the response. This is simply MongoDB's version number. - GET requests with an
If-None-Matchheader should respond "304: Not Modified" if the value of the header matches the current MongoDB version for the requested entity. - HEAD requests with an
If-None-Matchheader should respond "304: Not Modified" if the value of the header matches the current MongoDB version for the requested entity. - Should some simple sanity check should be performed against the client's version number? For example, if the client thinks they have version 4, but version 3 is the latest, should we return some sort of error response or just ignore it?
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels