def get_metric(revision, operator, path, key):
if "<STR_LIT::>" in path:<EOL><INDENT>part, entry = path.split("<STR_LIT::>")<EOL>val = revision[operator][part][entry][key]<EOL><DEDENT>else:<EOL><INDENT>val = revision[operator][path][key]<EOL><DEDENT>return val<EOL>
Get a metric from the cache.

:param revision: The revision id.
:type  revision: ``str``

:param operator: The operator name.
:type  operator: ``str``

:param path: The path to the file/function
:type  path: ``str``

:param key: The key of the data
:type  key: ``str``

:return: Data from the cache
:rtype: ``dict``