OLD | NEW |
---|---|
(Empty) | |
1 import datetime | |
2 import time | |
3 | |
4 epoch = datetime.datetime(1970, 1, 1) | |
5 | |
6 def main(req, res): | |
7 # Artificially delay response time in order to ensure uniqueness of | |
8 # computed value | |
9 time.sleep(0.1) | |
10 | |
11 now = (datetime.datetime.now() - epoch).total_seconds() | |
12 | |
13 return ([ | |
14 ('Cache-Control', 'no-cache, must-revalidate'), | |
15 ('Pragma', 'no-cache'), | |
16 ('Content-Type', 'application/javascript')], | |
17 'version = "%s";\n' % now) | |
OLD | NEW |