I am writing a simple multi tenant system and I want to use opcode caching. Lets say I have a single php web application accessed via 100 different domain names.
Will opcode cache the same files 100 times, or just once?
Thanks
You're not specifying the opcode cache you intend to use. NB: From PHP 5.5 onwards, you'll be constrained to ZendOptimizer+ anyway.
I am unsure about the answer for eAccellerator and XCache, however for APC and ZendOptimizer+ i can confirm that intermediate code for files executed unter seperate subdomains will only be cached once.
You can confirm this yourself by throwing an control panel script onto your web server (use ocp.php or for APC, use apc.php which is contained in the APC download). When calling up your web page from one domain, checking the control panel script from another domain will show additional cached files.