Azure / azure-storage-cpp

Microsoft Azure Storage Client Library for C++
http://azure.github.io/azure-storage-cpp
Apache License 2.0
132 stars 147 forks source link

Question: How does Cache-Control work in SDK? #312

Open yxiang92128 opened 4 years ago

yxiang92128 commented 4 years ago

From the client side, what does enabling cache-control do? Does it allocate additional buffers to store the blobs? Can you do something on the server backend to allow most frequently used blobs to be cached in order to boost the performance on download?

Thanks,

Yang

Jinming-Hu commented 4 years ago

Client side doesn't have any special process about Cache-Control, just takes it as a normal blob property.

I need to further confirm the server backend behavior, will get back to you later.

Jinming-Hu commented 4 years ago

Hi @yxiang92128 , Cache-Control is a HTTP header returned when downloading the blob, server side doesn't do any special process.

There are a few methods to boost download throughput.

  1. Use premier storage account.

  2. If your blob size is larger than 4M, set block size larger than 4M.

  3. Do cache in your application by yourself.

  4. If you are using web browser as client, Cache-Control will also help. Because browser doesn't need to download from server again within expiry time.

Jinming-Hu commented 4 years ago

We're going to close this issue because of inactivity, feel free to reopen it if you have any further questions.