Caching images duration

Hi there,

we have a webstore. Once products are uploaded with a wrong image they are cached. Even if deleted on our server the wrong image is still shown. Even after 1 week they are still to see.
In my opinion it has nothing to do with the browser cache, because when clearing it the wrong image is still shown.
The only solution to get rid of this is to login to Cloudflare, go to Caching and delete the image by passing the URL to it.
I want images only to be cached for 24hours. What options/rules do I have to set in Cloudflare?

Hi @thomas.schloesser,

You can solve this by adjusting the Cache-Control directives at your origin server or by setting up custom Edge Cache TTL settings through Page Rules.

These two articles from the Support Center are full of references:

2 Likes

Hi @dmz,

thanks for your replay. I just added a Page Rule:

https://www.myhomepage.de/media/image/product//md/.jpg
Edge-Cache-TTL: one day

But the image at the URL

https://www.myhomepage.de/media/image/product/280186/md/mytestpic.jpg

is still not updated after 5 days.
What am I doing wrong?

1 Like

Hi @thomas.schloesser,

Changing

https://www.myhomepage.de/media/image/product//md/.jpg

to

https://www.myhomepage.de/media/image/product/*

should solve.

This topic was automatically closed after 14 days. New replies are no longer allowed.