Create response filter that adds cache-control headers
In a few instances, we've encountered an issue with NGINX caching some results for a few minutes. In most cases this is desired and expected. However, when it is not desired, we need to be able to disable it. We currently have an easy solution that leverages undertow, as seen here: eclipse-openvsx-api#18 (closed)
For our use case, Undertow reads the undertow-handlers.conf
file and adds the following cache breaking headers to all outbound GET responses:
cache-control: no-cache, no-store, must-revalidate
pragma: no-cache
expires: 0
We should think about how we want to configure a filter that adds these same headers on GET requests. We could have it enabled=false
by default. All we would need to do is enable it on a project by project basis
/cc @malowe