The images below all derive from one shared cached original, fetched from our own
/demos/image-invalidation/source.jpg route — a Mochi.file() endpoint that serves a random bundled photo on every request. Hit the button to
invalidateImage(src, { hard: true }): it hard-deletes the cached original and cascades to every named size, so the next request
re-fetches the source and all sizes update to the same new photo in lockstep.
Shown at their relative sizes on one row, so the difference is visible at a glance:
invalidateImage() clears the cache on the server. A browser already holding a copy (via Cache-Control in production) keeps showing it until
that lapses — so this demo appends a small &g= nonce to force an immediate re-request. Pass { hard: false } (the default) instead to mark
the original stale: the next request serves the cached bytes right away and re-fetches in the background.