JC Borlagdan
JC Borlagdan

Reputation: 3638

Azure Storage Deleted blob still available

I have a link something like below to download my pdf from the Azure Storage

https://mycompany.blob.core.windows.net/invoice/someuniqueid.pdf

which works as intended.

My problem is when I try to delete the blob from the storage, (which will make the file unavailable if I call the link again) it still downloads the pdf.

I understand this is because of cache or something. But how or when does the cache clears?

Upvotes: 0

Views: 530

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136366

I understand this is because of cache or something. But how or when does the cache clears?

Your understanding is correct. Most likely the content was cached by the browser.

The duration for which a browser caches a blob can be controlled by Cache-Control property of the blob. By setting Cache-Control property appropriately (e.g. no-cache), you can instruct a browser to cache the content accordingly.

Upvotes: 1

Related Questions