none
Cache-Control and Pragma Response headers while reading files from Data Lakes

    Question

  • Why do we get the below 2 headers while trying to read files stored in Azure Data Lake using REST API?

    Cache-Control →no-cache, no-cache, no-store, max-age=0  (Why do we have multiple no-cache)

    Pragma →no-cache

    Why are these Headers getting set and How can we override them such them we can cache the responses ?

    Below is my curl request

    curl -v -X GET -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IlJyUXF1OXJ5ZEJWUldtY29jdVhVYjIwSEdSTSIsImtpZCI6IlJyUXF1OXJ5ZEJWUldtY29jdVhVYjIwSEdSTSJ9.eyJhdWQiOiJodHRwczovL21hbmFnZW1lbnQuY29yZS53aW5kb3dzLm5ldC8iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8wNmZhNTQ1Yy01MmQ3LTRiOGMtYjBmNy03MzQ5MTFiNDA0MmEvIiwiaWF0IjoxNDgxMTc3MTE3LCJuYmYiOjE0ODExNzcxMTcsImV4cCI6MTQ4MTE4MTAxNywiYXBwaWQiOiI3MzU0NDBhNy1kM2RmLTQ0YjEtYTk2Yy0wMTlhMzE5NmEwYmYiLCJhcHBpZGFjciI6IjEiLCJpZHAiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC8wNmZhNTQ1Yy01MmQ3LTRiOGMtYjBmNy03MzQ5MTFiNDA0MmEvIiwib2lkIjoiNTM4OTQyMjQtNDIyNC00MTllLTgxNzAtMzQ3NTQwNGI2NGFlIiwic3ViIjoiNTM4OTQyMjQtNDIyNC00MTllLTgxNzAtMzQ3NTQwNGI2NGFlIiwidGlkIjoiMDZmYTU0NWMtNTJkNy00YjhjLWIwZjctNzM0OTExYjQwNDJhIiwidmVyIjoiMS4wIn0.TrkCayxF0MJbXe7SPc8ZtMx8Aw07Plv0PE1KDAUw1hjHBgmTE95y0ivA2qKpmkvbLkreaGICmzc-4DPNcPBgQFHaiHzS9MoiC6c0mOO_0oOw7FRsbDYnL-P03_MEoHYDas7o2BC88ruZlHHePmoOHqwwXwBOgr6si5RwRmFz7InJpfILqENKD-fk2uWBWfQ1JU3xvmVLUgeoToFK-q7Xs
    g6eHgW84S4gGF7xuvjz2ogduxmhaV18A80rFFRFk70uHXllFcDylHKXPqgRJ9dfHswZEczxQSQCI2hH5XTn72xMUI0ygIFX4mPjwPQhxPAaygMLxYBOhG5gNm1vBAsJww" "https://signstorage.azuredatalakestore.net/webhdfs/v1/signsdata/test.txt?op=OPEN&api-version=2016-11-01&read=true"

    Response

    File contents and Response Headers are 

    < HTTP/1.1 200 OK
    < Cache-Control: no-cache, no-cache, no-store, max-age=0
    < Pragma: no-cache
    < Transfer-Encoding: chunked
    < Content-Type: application/octet-stream
    < Expires: -1
    < x-ms-request-id: 302fd601-0eca-4db0-a2de-cc2ee5d951d8
    < x-ms-webhdfs-version: 16.07.18.01
    < Status: 0x0
    < X-Content-Type-Options: nosniff
    < Strict-Transport-Security: max-age=15724800; includeSubDomains
    < Date: Thu, 08 Dec 2016 06:27:31 GMT


    Thursday, December 8, 2016 6:39 AM

Answers