Cloudinary ensures optimal image delivery through an advanced Content Delivery Network (CDN) equipped with efficient caching mechanisms. This enhances user experience and performance across your platform.
Images initially present on your site are stored in multiple CDN edges, enabling quick access. Consequently, even if you remove an image from your Cloudinary account, cached versions might persist. By default, images are cached for 30 days, ensuring that cached copies of deleted images are automatically cleared from the CDN after this period.
This approach typically aligns with the needs of websites and mobile applications. It's important to note that publicly accessible images could also be cached by external entities such as proxies and search engines.
Even after you delete, rename, or overwrite an image or video asset in your Cloudinary storage, any delivered versions of the asset, with or without transformations, can remain cached on CDN servers for up to 30 days.
To prevent the old asset from being delivered, you can send an
invalidation request instructing the CDN to remove cached copies of the old asset, so that the next request for the asset will pull the newest copy from your Cloudinary storage, or will return an error if the asset no longer exists.
You can send an invalidation request by setting the
invalidate parameter to
true in relevant methods of the Upload API. You may also be able to use relevant Admin API methods to invalidate media assets if support for bulk invalidations has been enabled for your account (not supported by default).
From within the Media Library, an
invalidate request is automatically included whenever you delete, rename, or overwrite media assets.