问题
I have two sites using the Symfony2 framework that have similar files.
The sites are both on the same server and use APC cache.
I have noticed that some items that are on one site are then used on another site.
Any APC that has been used have different and unique keys.
Is there some way of splitting the APC cache for each site or set a prefix or something?
回答1:
Have you tried to use ApcUniversalClassLoader()?
According to manual, in your autoload.php
you can boot APC with different keys:
require __DIR__.'/../vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php';
$loader = new ApcUniversalClassLoader('your_application_key');
Cheers ;)
来源:https://stackoverflow.com/questions/11395298/multiple-symfony2-sites-using-apc-cache