def parse_cache_control(header_value):
directives = {}<EOL>for segment in parse_list(header_value):<EOL><INDENT>name, sep, value = segment.partition('<STR_LIT:=>')<EOL>if sep != '<STR_LIT:=>':<EOL><INDENT>directives[name] = None<EOL><DEDENT>elif sep and value:<EOL><INDENT>value = _dequote(value.strip())<EOL>try:<EOL><INDENT>directives[name] = int(value)<EOL><DEDENT>except ValueError:<EOL><INDENT>directives[name] = value<EOL><DEDENT><DEDENT><DEDENT>for name in _CACHE_CONTROL_BOOL_DIRECTIVES:<EOL><INDENT>if directives.get(name, '<STR_LIT>') is None:<EOL><INDENT>directives[name] = True<EOL><DEDENT><DEDENT>return directives<EOL>
Parse a `Cache-Control`_ header, returning a dictionary of key-value pairs.

Any of the ``Cache-Control`` parameters that do not have directives, such
as ``public`` or ``no-cache`` will be returned with a value of ``True``
if they are set in the header.

:param str header_value: ``Cache-Control`` header value to parse
:return: the parsed ``Cache-Control`` header values
:rtype: dict

.. _Cache-Control: https://tools.ietf.org/html/rfc7234#section-5.2