How to clear the cache of an image?

Purging cache content from the dashboard or via API.

Rahul Nanwani avatar
Written by Rahul Nanwani
Updated over a week ago

There are two ways to clear the cache for a particular URL from ImageKit - via the Dashboard or using the Purge Cache API.

You can find the steps to purge cache through the dashboard here. You could also use the API to purge CDN and ImageKit.io's internal cache.

Purging Cache for multiple files

ImageKit allows you to purge the cache for multiple files within a directory provided these conditions are met.

Note: Clearing cache from ImageKit's dashboard, removes any cache for that particular URL on the CDN and ImageKit's internal caches. However, the cache in the user's browser is not cleared by this method. Browser cache will get cleared when the object associated with that URL expires or is forcefully cleared from the cache. It is thus best, to implement versioning in your static resource URLs to ensure instant updates for all your customers without having to clear your cache. You can read more about implementing versioning for your image URLs here.

Limits on Cache Clear

You can clear 1000 URL caches in a month from a single account (from both dashboard and the Purge API combined). After you reach this limit, cache clear requests will start getting blocked in your account. If you need more cache clear requests per month, please get in touch with us by creating a support ticket from your dashboard.

Questions?

In case you have any questions, please create a support ticket from your dashboard or if you are on a paid plan, start a conversation by clicking on the chat icon in the bottom right.

Did this answer your question?