Search code examples
phpcachingapcopcode

APC opcode caching on different file versions


We have a single server with several DIFFERENT versions of the SAME web application deployed on it.

For instance :

  • www.myserver.com
  • rc.myserver.com
  • alpha.myserver.com

We fear that there might be collisions between versions of the same PHP Class. Do APC correctly handle this? If not, how to workaround this?

Thanks for your help.


Solution

  • APC caches based on the path to the class, not just the class name. So as long as each of your versions have their own copy of the class you shouldn't have any problems.