If you are building a website that will display photos to users of the site, is it important to always give each photo a unique name?
For example, instead of naming a photo file using an index number such as "00001" like this:
<username>_00001.jpg
would it be better to name it using a unique random character string like this?
<username>_<random>.jpg
My thinking is that if the photo's owner were to want to replace that photo with a different photo and you give the new photo the same name as the old photo, then when another user views the photo, their browser will see that same photo name in its cache and display the old photo rather than a newer one.
I should add that the photos will be stored on a CDN such as Akamai or Amazon Cloudfront.