1

We have an interesting behaviour that we are trying to understand/workaround.

We have an Azure Function running on a consumption host that has nothing but proxies on it. One of these proxies points to an Azure CDN endpoint, that in turn points to an Azure Storage Account.

From time to time we update the file in the storage account and purge the CDN endpoint.

Requesting the file directly from the CDN returns the (correct) new file data. However, the Function Proxy url continues to return the (incorrect) old file data.

Browser caches are disabled/cleared and all that normal stuff. We can see the Last-Modified headers are different, so clearly the proxy is returning the old file.

Further, adding a querystring to the proxy URL - anything you like (we used ?v=1) would return the (correct) new file. Removing the querystring gets us back to the old file again.

Is this behaviour intentional? I have read UserVoice requests where people wanted caching added to Functions and it was explicitly declined due to the number of alternatives available. I see no other explanation for this behaviour, though.

Does anyone know how to disable/defeat proxy response caching?

Richard Hauer
  • 1,298
  • 9
  • 22
  • I met similar situation several years ago, but I didn't remember that clearly. I just remember that we added a timestamp to the request to make the cache expired. We were sure that problems resulted from Chrome but we didn't find the solution.
    Back to your problem, my suggestion is trying other browsers to test if the problem is related to browsers.
    – Tiny Wang Dec 16 '20 at 05:53
  • Thanks for your thoughts @Tiny-wa but we can repro across browsers and across computers, even across continents actually. – Richard Hauer Dec 16 '20 at 09:07

0 Answers0