Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: scripts/redirector.py

Issue 22898006: In the dev server, files are not cached (Closed) Base URL: https://github.com/dart-lang/dartdoc-viewer.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/redirector.py
diff --git a/scripts/redirector.py b/scripts/redirector.py
index 2f361dac7eada1f39fe307d1ea08a3b93686c25b..df6af5dc606de9c3952721455b278363e925d7d0 100644
--- a/scripts/redirector.py
+++ b/scripts/redirector.py
@@ -42,7 +42,9 @@ class RequestHandler(blobstore_handlers.BlobstoreDownloadHandler):
path = LOCAL_PATH + self.request.path[len('docs/'):]
with open(path, 'r') as file:
result = file.read()
- self.HandleCacheAge(path)
+ # The cache age should be zero seconds if being run locally.
+ self.response.headers['Cache-Control'] = 'max-age=' + \
Emily Fortuna 2013/08/15 20:26:23 the pythonic way to write this line is this: self.
Tate Mandel 2013/08/15 20:34:04 Done.
+ str(0) + ',s-maxage=' + str(0)
self.response.out.write(result)
def GetGoogleStorage(self):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698