def parse_cache_control(self, headers):
retval = {}<EOL>cc_header = '<STR_LIT>'<EOL>if '<STR_LIT>' in headers:<EOL><INDENT>cc_header = '<STR_LIT>'<EOL><DEDENT>if cc_header in headers:<EOL><INDENT>parts = headers[cc_header].split('<STR_LIT:U+002C>')<EOL>parts_with_args = [<EOL>tuple([x.strip().lower() for x in part.split("<STR_LIT:=>", <NUM_LIT:1>)])<EOL>for part in parts if -<NUM_LIT:1> != part.find("<STR_LIT:=>")<EOL>]<EOL>parts_wo_args = [<EOL>(name.strip().lower(), <NUM_LIT:1>)<EOL>for name in parts if -<NUM_LIT:1> == name.find("<STR_LIT:=>")<EOL>]<EOL>retval = dict(parts_with_args + parts_wo_args)<EOL><DEDENT>return retval<EOL>
Parse the cache control headers returning a dictionary with values
for the different directives.