#NEWLINE# def _generate_cache_key( request , method , headerlist , key_prefix ) : #NEWLINE# #INDENT# 'Returns a cache key from the headers given in the header list.' #NEWLINE# ctx = hashlib . md5 ( ) #NEWLINE# for header in headerlist : #NEWLINE# #INDENT# value = request . META . get ( header ) #NEWLINE# if ( value is not None ) : #NEWLINE# #INDENT# ctx . update ( force_bytes ( value ) ) #NEWLINE# #UNINDENT# #UNINDENT# url = hashlib . md5 ( force_bytes ( iri_to_uri ( request . build_absolute_uri ( ) ) ) ) #NEWLINE# cache_key = ( 'views.decorators.cache.cache_page.%s.%s.%s.%s' % ( key_prefix , method , url . hexdigest ( ) , ctx . hexdigest ( ) ) ) #NEWLINE# return _i18n_cache_key_suffix ( request , cache_key )