From 8f3b7be2e1130a94cf4de5e9e1b5a18d382efff8 Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Wed, 18 Apr 2012 13:57:36 +0100 Subject: 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. --- morph-cache-server | 1 + 1 file changed, 1 insertion(+) diff --git a/morph-cache-server b/morph-cache-server index b13241b..60c3105 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, -- cgit v1.2.1