diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-04-18 13:57:36 +0100 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-04-18 13:57:36 +0100 |
commit | 8f3b7be2e1130a94cf4de5e9e1b5a18d382efff8 (patch) | |
tree | 037d5b9a24fc85300619ab488675b202d52b5533 | |
parent | 63927c35611bf56a1fce03750e953ec5250fb282 (diff) | |
download | morph-8f3b7be2e1130a94cf4de5e9e1b5a18d382efff8.tar.gz |
Use "Cache-Control: no-cache" to avoid caching of /sha1s results.
Resolving a ref may result in a different SHA1 between any two requests,
so we simply should never allow the results to be cached by an HTTP
cache.
-rwxr-xr-x | morph-cache-server | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/morph-cache-server b/morph-cache-server index b13241ba..60c31053 100755 --- a/morph-cache-server +++ b/morph-cache-server @@ -47,6 +47,7 @@ class MorphCacheServer(cliapp.Application): repo = self._unescape_parameter(request.query.repo) ref = self._unescape_parameter(request.query.ref) try: + response.set_header('Cache-Control', 'no-cache') sha1 = repo_cache.resolve_ref(repo, ref) return { 'repo': '%s' % repo, |