Hello everyone,
At my new job, I've been tasked with setting a new environment for our Q.A. team. The objective is to obtain a single dynamic Apache virtualhost that can point to different releases of a PHP application, i.e. product-name-V1_8_0_0
would use /var/product/releases/1.8.0.0
as its DocumentRoot, while product-name-V1_8_1_2
would use /var/product/releases/1.8.0.0
as its DocumentRoot and so on.
I've figured out how to obtain this dynamic behaviour using Apache's mod_vhost_alias, but I'm concerned about PHP's APC cache. Let me explain :
The application is ran by php-fpm
and is proxied by apache through a socket. My concern is that requesting, for instance, http://product-name-V1_8_0_0/index.php
would trigger caching of version 1.8.0.0's bytecode for index.php
and that a subsequent request of http://product-name-V1_8_1_2/index.php
would show the output of this cached version of the code instead of the newer version's.
I'm really not familiar with PHP and its caching mechanism, so I would greatly appreciate if you guys could tell me :
- if this is actually an issue
- if it is, how I can solve the problem
If there is actually a problem here, I must add that disabling the cache altogether is not an option : this is meant to be a testing environment, and we must be able to detect any cache-related issue that might arise.
p.s.: I'm not sure if this type of question is appropriate for this sub... If it is not, please let me know where it would fit better !
[link][1 comment]