You can set a relatively short cache expiration (for instance ~4 hours). Then when a cached file expires, Cloudflare will revalidate whether the file has changed (sending ETag or modification date to Episerver). If the file has not changed in Episerver, then Cloudflare will use the version it already has.
We have processes that import new Commerce data and their associated assets into Epi. The commerce data and assets should match. So until the cache expires, our assets are old/wrong. Another scenario is if a user fixes a legal document they are forced to wait for the cache to clear.
A great solution would be to have a Cloudflare API that would allow us to clear individual Urls.
If it is very important to have assets invalidated shortly, maybe even immediately, after updating them, consider turning off caching. Or just turn it way down (e.g. 30-60 minutes).
Cloudflare will still revalidate the assets against Episerver, using ETag or Last Modified Date. And if a given asset file has not changed, Episerver will tell Cloudflare just that and that's it.
Doesn't help right now, but as an FYI, the ability to clear a single URL from the CDN cache is on the 2021 roadmap: https://feedback.episerver.com/ideas/DXCS-I-254
We are using Episerver DXP.
We have a DAM product, Digizuite, that integrates with Episerver.
When we publish an asset to Episerver, the asset is stored in blob storage.
The Urls look like mysite.com/globalassets/digizuite/12345-my-title.pdf
I don't want this Url to change, so everyone, including Google will use this Url.
This Url will get cached in Cloudflare.
I realize I can specify cache expiration.
But, I feel like I have no option but to purge the entire Cloudflare cache if a user tells me they uploaded a new version of a file to the DAM and they don't see the new file.
I've asked Episerver support if Cloudflare offers a single Url purge and I was told no.
Are my only options to purge everything OR set the cache expiration to be very small, ~4 hours?