def _generate_cache_key(request, headerlist, key_prefix):
 ctx = md5.new()
 for header in headerlist:
  value = request.META.get(header, None)
  if (value is not None):
   ctx.update(value)
 return ('views.decorators.cache.cache_page.%s.%s.%s' % (key_prefix, request.path, ctx.hexdigest()))

def _generate_cache_key ( request , headerlist , key_prefix ) : ctx = md5 . new ( ) for header in headerlist : value = request . META . get ( header , None ) if ( value is not None ) : ctx . update ( value ) return ( 'views.decorators.cache.cache_page.%s.%s.%s' % ( key_prefix , request . path , ctx . hexdigest ( ) ) )
returns a cache key from the headers given in the header list .