dlcs / protagonist

MIT License
7 stars 2 forks source link

Remove locally cached file on ingest #888

Open donaldgray opened 3 months ago

donaldgray commented 3 months ago

If an existing image has served an image-request via image-server then the source file will be on hot disk.

If that asset is then reingested then the image source at origin may have changed (e.g. original was flipped so image at source has been fixed).

We should prevent this happening, else a reingested image can look like it has failed. Ideally we should only do this if the source image has changed but to do so we'd need to store something like a checksum. Alternatively we can always clear it from hot-disk - if we take this approach are there any risks? If Orchestrator has a cached record for this image and we remove from hot-disk then user would view a 404 until Orchestrator cache ttl has elapsed.