summary refs log tree commit diff
path: root/docs/postgres.md
diff options
context:
space:
mode:
authorErik Johnston <erikj@element.io>2025-03-13 16:28:19 +0000
committerGitHub <noreply@github.com>2025-03-13 16:28:19 +0000
commit59a15da43364c6b3319983e68f686750a918ec9a (patch)
tree0a22726afbbe990d16e8f7cd30d9bd03b2107da8 /docs/postgres.md
parentFix detection of workflow failures in the release script. (#18211) (diff)
downloadsynapse-59a15da43364c6b3319983e68f686750a918ec9a.tar.xz
Add caching support to media endpoints (#18235)
We do a few things in this PR to better support caching:

1. Change `Cache-Control` header to allow intermediary proxies to cache
media *only* if they revalidate on every request. This means that the
intermediary cache will still send the request to Synapse but with a
`If-None-Match` header, at which point Synapse can check auth and
respond with a 304 and empty content.
2. Add `ETag` response header to all media responses. We hardcode this
to `1` since all media is immutable (beyond being deleted).
3. Check for `If-None-Match` header (after checking for auth), and if it
matches then respond with a 304 and empty body.

---------

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
Diffstat (limited to 'docs/postgres.md')
0 files changed, 0 insertions, 0 deletions