Automation for purging the CDN cache
Currently, when content authors choose to upload image or other media files and replace existing media with the same name, the old replaced media lingers in the CDN cache. The CDN cache can be quickly purged through the PaaS portal, but this is a manual step that requires accessing another site outside the CMS itself.
It would be good if Optimizely could provide an API to purge the CDN cache. This would allow development around purging the CDN cache.
But ideally, functionality could be built into CMS for this. When replacing an existing media file with the same name, CMS could have the ability to use the Cloudflare API to purge that file from the cache by URL ("Purge Cached Content by URL" in the Cloudflare documentation at https://developers.cloudflare.com/api/resources/cache/methods/purge/. ).
-
goran.schneeperger
commented
It would be nice if you could expose endpoint so that we could invoke purging of CDN cache after successful deployment to production environment hosted in DXP. I have found that Cloudflare actually supports that via
az cdn endpoint purge -g fagf01mstry1y19inte --content-paths '/*'
but for that to be used by us you would have to wrap it in your endpoint if I understood correctly based on answer to my support ticket.