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.
- Either allow non-numeric ids in download-times.json or provide another file to write the preferred id
- Update app-download.js to accept another parameter, `cacheId: string` that specifies the id to use
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