I have installed PHP 5.5.1 in my development environment and also have the configuration of Zend OpCache as a cache provider. Everything works on the server with the new version and settings, but inside my symfony 2 project I have a Doctine2 cache for storing some "static" data (countries, languages, etc.), and it does not work with Opcache.
Until today, I used the Doctrine \ Common \ Cache \ ApcCache class to work with the Doctrine2 cache using APC, but it seems that this class does not exist for working with OpCache.
This is my config.yml for the APC cache:
# Services services: cache: class: Doctrine\Common\Cache\ApcCache
Now, using OpCache, I tried to use ZendDataCache to work with the caching system, but it does not work:
# Services services: cache: class: Doctrine\Common\Cache\ZendDataCache
I get this error, so I assume that the ZendDataCache class is not for OpCache:
FatalErrorException: Error: calling the undefined Doctrine \ Common \ Cache \ zend_shm_cache_fetch () function on /var/www/meediam/src/vendor/doctrine/common/lib/Doctrine/Common/Cache/ZendDataCache.php line 38
Finally, I configured ArrayCache and it works, but without a cache system.
So the question is, Does anyone know how to use Zend OpCache with Doctrine 2 cache?
PS: I am using Symfony 2.3.2
php symfony doctrine2 opcache
unairoldan
source share