Cache issue: overlay image changes but URL does not

Comments

5 comments

  • Avatar
    Maor Gariv

    Hey,

     

    Thanks for reaching out.

     

    You're right. Overwriting an overlay image will not affect existing derived resources in your account. 

    A possible solution is to use the `underlay` parameter instead. It means that the image you change often will be the main image and the background (i.e., the coffee mug in our example) will be set as an underlay of that image.

    For example,

    http://res.cloudinary.com/demo/image/upload/w_90,g_center/u_coffee_cup,w_400,h_250,c_fill,g_south/fl_layer_apply/nice_couple.jpg

    That way, when overwriting and invalidating the image, all derived copied will be deleted as well.

    Hope this help, Let me know if you have any further questions.

    0
    Comment actions Permalink
  • Avatar
    Julbox Ltd

    Thank you Maor for your response.

    I was wondering - Is there any way to invalidate or break the cache in such a case?

    Is there any way to control caching?

    Thanks.

    0
    Comment actions Permalink
  • Avatar
    Maor Gariv

    Hi,

     

    In the case you specified, you need to re-upload (overwrite) and invalidate the *main* image. Doing so will also automatically delete and invalidate the derived copy.

    That being said, switching the approach to `underlay` will do the same when you overwrite the main image (goes well with your use-case).

    0
    Comment actions Permalink
  • Avatar
    CloudClefs Vendor

    I'm having a similar issue here. I think it is good if there is a way to invalidate the overlay image. Seems like my corrupted image is permanently stuck.

    0
    Comment actions Permalink
  • Avatar
    Roee Ben Ari

    Hi @CloudClefs Vendor,

    In order for the new overlay image to be reflected, you actually need to re-generate the derived resource. Did you do that? If you did and still see an issue, please share a couple of example URLs via support@cloudinary.com and will be glad to help further. 

    0
    Comment actions Permalink

Please sign in to leave a comment.