@app.route('/cache', methods=('GET',))
def cache(request):
    is_conditional = (
        request.headers.get('If-Modified-Since') or
        request.headers.get('If-None-Match')
    )

    if is_conditional is None:
        response = view_get(request)
        response.headers['Last-Modified'] = http_date()
        response.headers['ETag'] = uuid.uuid4().hex
        return response
    else:
        return status_code(304)
Iterate over all image sentence pairs where an image may be repeated
dataset/ETHPy150Open mozillazg/bustard/tests/httpbin/core.py/cache--crossover with--dataset/ETHPy150Open NervanaSystems/neon/neon/data/imagecaption.py/ImageCaption.iterImageSentencePair