Improve caching
Figure out best response for incoming HTTP headers that affect caching. At this moment resources cached by CloudFront seem to get refreshed:
Update cache response headers so that resources stay cached longer in our AWS Cloudfront.
TODO
Return Not modified
when (see #clientCacheValid()
).
- Client header
Etag
matches - Header
If-Modified-Since
matcheslastModifiedDate
- Other headers?
- Return
Not modified
HTTPS status as soon as possible in code - Consider updating
maxage
Start with code in RepositoryDownloadController
v1, then check all server code that now returns cache headers and add better cache-handling when possible.