Document how ETag caching middleware handles query parameters

This commit is contained in:
Adam Niedzielski 2017-04-05 16:14:25 +02:00
parent d4349ba6c4
commit 3bec613194
1 changed files with 6 additions and 0 deletions

View File

@ -39,6 +39,12 @@ Instead you should use polling mechanism with ETag caching in Redis.
1. If the `If-None-Match` header does not match the current value in Redis
we have to generate a new response, because the resource changed.
Do not use query parameters (for example `?scope=all`) for endpoints where you
want to enable ETag caching. The middleware takes into account only the request
path and ignores query parameters. All parameters should be included in the
request path. By doing this we avoid query parameter ordering problems and make
route matching easier.
For more information see:
- [RFC 7232](https://tools.ietf.org/html/rfc7232)
- [ETag proposal](https://gitlab.com/gitlab-org/gitlab-ce/issues/26926)