File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 24
24
# Request Handlers
25
25
class Handler (webapp2 .RequestHandler ):
26
26
__CORS = True
27
+
27
28
def __init__ (self , * args , ** kwargs ):
28
29
super (Handler , self ).__init__ (* args , ** kwargs )
29
30
@@ -151,9 +152,11 @@ def get(self, username):
151
152
analytics = self .get_option ('a' , '1' )
152
153
jsonp = self .request .get ('callback' , '' )
153
154
if jsonp : # jsonp header should be there always
154
- self .response .headers .add_header ('content-type' ,
155
- 'application/javascript' ,
156
- charset = 'utf-8' )
155
+ self .response .headers ['content-type' ] = \
156
+ 'application/javascript; charset = utf-8'
157
+
158
+ self .response .headers ['cache-control' ] = \
159
+ 'public, max-age={}' .format (MEMCACHE_EXPIRATION / 2 )
157
160
158
161
memcache_key = '{0}?{1}sa{2}j{3}' .format (username , support ,
159
162
analytics , jsonp )
You can’t perform that action at this time.
0 commit comments