For customers on paid plans, we support setting an expiration policy for your assets of type 'Fetch.'
Enabling this policy will automatically delete or refresh every Fetched asset whose age is older than a predefined interval.
After defining a lifecycle period ( for example, 1 week, 1 month, 3 months, etc.), if the policy is Refresh, Cloudinary will check the remote asset at the specified interval and re-fetch it from the remote source if it is different from the one currently existing in your product environment. By default, we do this once 7 days after a fetched asset is first retrieved.
With the Delete policy, the Fetched assets are deleted. This is handy if you don’t expect all Fetch assets to be used. When Cloudinary deletes them, they will no longer use up Storage unless they are requested again from your side.
Please note that when enabling either of those Fetch policies, the change is applied only to newly Fetched assets and not to those already existing in your product environment. If you wish to apply the policy to existing Fetched assets, you will need to delete the relevant assets from your product environment. You can do this from Media Library UI (Bulk Delete) or through the destroy() method of the Upload API. Upon the next request, the newly configured policy will be applied to the Fetched assets.
For Facebook, Twitter, and other social network profile images, only a Refresh policy can be set.
If you are on a paid plan and would like to set an expiration policy on your Fetched assets, please contact us, providing your desired lifecycle policy and interval. We'll be happy to set it up for you.
Comments
6 comments
Is the default cache time for fetched resources still one week?
Hi,
Yes. It is 7 days by default.
We can configure your account to cache it for different intervals (24 hours - month). It's available for all of our paid plans.
Hi,
Can we change the expiry for the "Uploaded" resources as well?
Hi,
I'm interested in the expiration of Uploaded images. Is it possible to configure our or your end?
Hi Dzmitry,
I can see you contacted us about this directly also, and I replied to your ticket a few minutes ago.
For the benefit of others reading this, there isn't a 'direct' way to 'expire' uploaded images automatically, but you can bulk delete based on the uploaded time, or by last-access time (available on paid accounts).
Another common option is to use our standard APIs to delete images, using a tag or folder that you set at upload time to help you keep track of images which should be deleted after some time
Regards,
Stephen
Please sign in to leave a comment.