PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am using the following controller action to output my users's images, and when a user changes their image, (avatar) it will take around a second to switch... meaning if you go to the image, it shows the old one for around a second and then it gets switched to the new one... is this a cache issue? What causes this?
Yes it's a caching issue. To overcome this you can generate a large, fairly high entropy textual string such as the result of md5() for the filename. Hopefully you will come up with a unique name more often than not. However you can also set the server to send a default life on those files of say one day.