@staticmethod
def _add_stale_cache_request_headers(request, cached_resp):
    """
        The cached response is stale, so we need to re-validate it with
        the server. Add the `if-modified-since` and `if-none-match`
        headers to the request as appropriate.
        """
    if ('last-modified' in cached_resp.headers and 'if-modified-since' not in
        request.headers):
        lm = cached_resp.headers['last-modified']
        request.headers['if-modified-since'] = lm
    if ('etag' in cached_resp.headers and 'if-none-match' not in request.
        headers):
        et = cached_resp.headers['etag']
        request.headers['if-none-match'] = et
