Facing this strange problem that if I deploy my code, and even clear the xcache, then also the code is calling some of the old files. This behaviour is random. I checked the xcache , it is getting clear every time but still some times it works fine then again try to access the old file and some how go fine. This problem is not with js or css as we maintain version for them ,but it is in case of php classes and functions.
I am not at all getting any idea from web or otherwise why this is happening.I also tried touching all the files but same issue exist even with more frequency. I am using LAMP environment with xcache and deploying releases through capistrano. I verified xcache clear from its admin. Tried different versions of xcache but no help.
May be the case is following but I don't have solution for this as well : If we have a long request processing, we deploy and symlink changes in between and if this request include another file, then both the old and new files get included causing the issue.
Please suggest where I can move further.