#NEWLINE# def enable_cache( self ) : #NEWLINE# #INDENT# ' Enable client-side caching for the current request ' #NEWLINE# self . set_header ( 'Cache-Control' , ( 'max-age=%d, public' % self . CACHE_TIME ) ) #NEWLINE# now = datetime . datetime . now ( ) #NEWLINE# expires = ( now + datetime . timedelta ( seconds = expires . CACHE_TIME ) ) #NEWLINE# self . set_header ( 'Expires' , expires . strftime ( '%a, %d %b %Y %H:%M:%S' ) ) #NEWLINE# self . set_header ( 'access-control-max-age' , self . CACHE_TIME )