def _get_dependencies_from_cache(ireq):
    """Retrieves dependencies for the requirement from the dependency cache.
    """
    if os.environ.get("PASSA_IGNORE_LOCAL_CACHE"):
        return
    if ireq.editable:
        return
    try:
        deps = DEPENDENCY_CACHE[ireq]
        pyrq = REQUIRES_PYTHON_CACHE[ireq]
    except KeyError:
        return

    # Preserving sanity: Run through the cache and make sure every entry if
    # valid. If this fails, something is wrong with the cache. Drop it.
    try:
        packaging.specifiers.SpecifierSet(pyrq)
        ireq_name = packaging.utils.canonicalize_name(ireq.name)
        if any(_is_cache_broken(line, ireq_name) for line in deps):
            broken = True
        else:
            broken = False
    except Exception:
        broken = True

    if broken:
        print("dropping broken cache for {0}".format(ireq.name))
        del DEPENDENCY_CACHE[ireq]
        del REQUIRES_PYTHON_CACHE[ireq]
        return

    return deps, pyrq
Retrieves dependencies for the requirement from the dependency cache.