As documented ArcGIS Experience Builder | Deployment you can manually rename cdn/x to cdn/y and update a couple references to bust the service worker cache. Alternatively you can increment the value in download-times.json file as well.
However, for CI/CD scenarios this is a bit cumbersome. It would be helpful if we could supply a git commit hash to use as the cache busting id. Some non-exhaustive suggestions.
With this in place more options are available to developers to assist busting cache in a repeatable way. Folks could use commit hash, commit tag, date format, a numeric sequence, or anything else suitable for their particular needs.
---
For anyone seeing this that needs a quick workaround for their CI, you can turn your git short hash into an unsigned integer and set that as they value in the download-times.json. The number will be incremented by 1 in the final output but this should work until there is official support for arbitrary strings of our making.
Here's an example in PowerShell
Write-Host "Busting cache..."
$gitHash = git rev-parse --short HEAD
$numHash = [uint32]"0x$gitHash"
$numHash | Set-Content $downloadTimesJsonFile -Force
I'm just now reading about CI/CD deployment, and I've seen two different ways that works.
Often the same folder is cleared, then deployed to on the host. Some create a new folder per build name and repoint stuff (that seems tricky to me)
I know with Custom Widgets things getting cached can be frustrating at times. I think updating one of the settings in manifest.json might have a cache busting impact, but I have yet to prove that changing the version of the widget in the manifest does it reliabiliy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.