Is there some way to make OPcache use a hash or target a specific directory on each domain to disable use_pwd so it won't cache the same packages over and over?
By default OPcache appends the working directory to the script key to prevent collisions. This can be toggled with the opcache.use_cwd setting but isn't really usefull on a server with multiple websites as php config files collide.
Background I have multiple Symfony, Magento 2 ect. applications running on the same server, the vendor directory is 95% of all PHP code for each of these applications creating many many duplicate files in OPcache.