I'm using Azure Storage to serve up static file blobs but I'd like to add a Cache-Control and Expires header to the files/blobs when served up to reduce bandwidth costs.
Application like CloudXplorer and Cerebrata's Cloud Storage Studio give options to set metadata properties on containers and blobs but get upset when trying to add Cache-Control.
Anyone know if it's possible to set these headers for files?
This might be too late to answer, but recently I wanted to do the same in different manner, where I have list of images and needed to apply using powershell script (of course with the help of Azure storage assembly) Hope someone will find this useful in future.
Complete explanation given in Set Azure blob cache-control using powershell script
Set storage blob cache-control Properties by PowerShell script
https://gallery.technet.microsoft.com/How-to-set-storage-blob-4774aca5
Sometimes, the simplest answer is the best one. If you just want to manage a small amount of blobs, you can use Azure Management to change the headers/metadata for your blobs.
In that edit window, you can customize the Cache Control, Content Encoding, Content Language, and more.
Note: you cannot currently edit this data from the Azure Portal
I had to run a batch job on about 600k blobs and found 2 things that really helped:
Running the operation in parallel. The Task Parallel Library (TPL) in .net v4 makes this really easy. Here is the code to set the cache-control header for every blob in a container in parallel:
Latest CloudBerry Explorer now supports Cache-Control: http://www.cloudberrylab.com/forum/default.aspx?g=posts&t=3047
Here's an updated version of Joel Fillmore's answer:
Instead of creating a website and using a WorkerRole, Azure now has the ability to run "WebJobs". You can run any executable on demand on a website at the same datacenter where your storage account is located to set cache headers or any other header field.
The code below runs a separate task for each container, and I'm getting about 70 headers updated per second per container. No egress charges.