Free Tier Image Refresh Interval w/Fetch API
The Fetch API docs make clear that for paid plans, images uploaded via the Fetch API are refreshed every 7 days by default.
Due to the wording used in the docs, it is unclear to me which of the following is true:
(a) For the free tier, images uploaded via the Fetch API are refreshed every 7 days
(b) If you want images uploaded via the Fetch API to refresh on a time interval (e.g. 7 days), you must have a paid account
Any clarification about whether (a) or (b) is correct would be most appreciated. Thank you!
-
Hi Nick,
Of those statements, (b) is true.
The default behavior is that one single time, 7 days after the image is first fetched, we refresh it and update the cached copy in your account if the content of the remote URL has changed. This is to accommodate the relatively common use case of the remote image being changed shortly after a customer migrates their site to use fetched images from their existing storage location.
On any paid plan, we can adjust this behaviour in two ways. We can change it so that the image is refreshed or deleted, and can change it so that instead of 'once', the operation takes place after a repeating interval. This allows use-cases like "delete all fetched images 30 days after they're fetched" or "refresh all fetched images every 5 days".
If you can let me know some more about your requirements I can suggest a specific solution using these options or using our API or UI directly.
At a high level, there are several overlapping options available to manage fetched images which don't require the use of that account level refresh/delete option; you can:
- Use the API or UI to bulk delete fetched images older than a specific date (bulk delete job in the sidebar of the account settings)
- Delete specific images that have been fetched (the next time we see a request for the image we'll fetch it again automatically as if it were a new image): https://cloudinary.com/documentation/image_upload_api_reference#destroy_method
- Make an API call to explicitly ask that we refresh an image (e.g. if you know the remote URL's content has changed via some workflow in your system, a trigger on a storage bucket, etc): https://cloudinary.com/documentation/image_upload_api_reference#explicit_method
Please let me know if that helps and if there's anything else I can help with, either about the automatic expiry, or the ways to manage fetched images directly mentioned above
Regards,
Stephen
1
Post is closed for comments.
Comments
1 comment