This seems like a bug or missing feature (I know it can be workarounded using DigitalOcean API or
doctl compute cdn flush $cdn_id --files $file
The issue is when doing any file changes in DigitalOcean Spaces e.g. uploading an updated file using s3cmd - it is still stuck in CDN with the old file. Why DigitalOcean doesn't automatically purge file from CDN when the file is identified as changed or even removed? For example if doesn't exist, after I upload test.jpg to space would display it without requiring me to purge CDN cache. It is not consistent with case if test.jpg already exist and after I delete it or upload modified test.jpg, now still be stuck with the old file. DigitalOcean should automatically identify change and purge it from CDN cache.