I was looking into the CDN aspect of Contentful and was wonder about caching.
Yesterday I created and published an image and got the asset’s direc URL on the CND back via the API, i.e. https://images.ctfassets.net/[space-name]/[asset-id]/[version?]/[file-name].jpg
I then unpublished the image and noticed that the file was still available at that URL. I tried to overwrite the image with a 1x1 pixel white square & that had no affect after a repubish.
So was just wondering,
- if it’s possible to purge an image from the cache?
- what’s the default TTL of something that’s cached on the CDN?
- if it’s considered ‘safe’ to expose CDN URLs to an end-user?
I’m just thinking about cases like e.g. I accidentally publish “company-trade-secrets.pdf” rather than “company-december-press-release.pdf”.
(Apologies if I missed this in the docs or an old forum post, I did search both but couldn’t find a topic on it.)