Caching unsuccessful request

Hi,

we have added the “no-store” setting but problem is still remaining in some way, I will try describe it more further.

We have a image on URL like https://kompasslev.cz//public/gimg/2/6/1/5/6/7/4/2615674-240-390.jpg
but it does not need to exists - if it does not, there is a redirect to our images’ archive like https://archiv.kompasslev.cz/kompasslev.cz//public/gimg/2/6/1/5/6/7/4/2615674-240-390.jpg.

Let’s say that the image does not exists in our server and also in archive - then CF cache the URL like https://archiv.kompasslev.cz/kompasslev.cz//public/gimg/2/6/1/5/6/7/4/2615674-240-390.jpg with 403/404, but after some time the image can apper in URL like https://kompasslev.cz//public/gimg/2/6/1/5/6/7/4/2615674-240-390.jpg and CF can’t reach it, beacause it has cached the archive URL.

Do you have any suggestion how to fix it?