Can you invalidate cache of transformations from Fetched images?
I currently use the upload API to upload new images to Cloudinary Media Library. I use the API to also invalidate cache of images that my users may delete. Is this "invalidate cache" capability also available for remote images that are fetched? I ask because I am thinking of not storing images in Cloudinary Media Library but to use my Google Storage service, instead. I will thus then just use Cloudinary to handle the dynamic resizing of images.
-
Official comment
Hi Nick.
Thanks for getting in touch. There are a few options available to you here:
- You can invalidate the asset via an explicit() call to the Upload API. Just remember to set the
type
to "fetch" andinvalidate
to true. In node it would look something like this:cloudinary.uploader.explicit("https://mydomain.com/myimage.jpg", {type: "fetch",invalidate: true })
- You can delete the asset from your Media Library and the cache will automatically be invalidated. The next time it's requested, it will pull in the latest version from the URL you provide
- You can use versioned URLs to avoid cache confusion when updating remote content
You can also use Google Storage as the source of your assets, instead of relying on the fetching upload type. I hope this answers your question. Feel free to reply here or raise a support ticket with us if you need anything else.
Thanks,
-Danny - You can invalidate the asset via an explicit() call to the Upload API. Just remember to set the
-
Thank you, that was very helpful1
A question about the "use Google Storage as the source of your assets" option you mentioned above: What is the benefit of doing that vs just using fetch type of a remote image?
0 -
Hi Nick,
Sorry for the last response.
My colleague Danny mentioned an additional option in case your assets are saved in your private storage that you would like to upload to your Cloudinary account.
I would like to add another option: another product called *Media Optimizer* in case you don't want to use storage in Cloudinary. You could learn about it in the following guide :
https://cloudinary.com/documentation/media_optimizerRegards,
Wissam
0
Post is closed for comments.
Comments
3 comments