How to Manage Expiration of Blob Content in the Azure Content Delivery Network (CDN)

From Yggenyk
Jump to navigation Jump to search

CDN caches items where a cache value is not set for the default TTL of 7 days.

CDN is best for static content with a high cache hit ratio.
CDN would still cache the content, unless the cache-expiry passes, or the file name changes.
Using CDN for dynamic content is not recommended, because it causes the user to wait for a double hop from storage to cdn and from cdn to user.

You also pay twice the bandwidth on the initial load.

You can check the TTL using wget.exe of Fiddler:
wget.exe --server-response --spider [URL] If the response says:

HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Cache-Control: 3600

the item will be cashed for 36000 seconds = 1 hour.

x-ms-blob-cache-control: public, max-age=36000