def urlparse_cached(request_or_response):
    """Return urlparse.urlparse caching the result, where the argument can be a
    Request or Response object
    """
    if request_or_response not in _urlparse_cache:
        _urlparse_cache[request_or_response] = urlparse(request_or_response.url)
    return _urlparse_cache[request_or_response]
Return urlparse.urlparse caching the result, where the argument can be a
    Request or Response object
    
stackoverflow/venv/lib/python3.6/site-packages/scrapy/utils/httpobj.py