We're using symfony2 with php 5.6.
With default config we can cache validation metadata:
framework:
validation:
cache: apc
How can we use this with PHP 5.6 and built in OpCache?
In default app.php we can cache the class autoloader:
if (extension_loaded('apc')) {
$apcLoader = new ApcClassLoader('foo', $loader);
$apcLoader->register(true);
}
How can we achieve the same using Zend OpCache? We tried with UniversalClassLoader but we are not shure, if this is right.
In default config we can use apc also for caching doctrine metadata, dql, and so on:
doctrine:
orm:
metadata_cache_driver: apc
result_cache_driver: apc
query_cache_driver: apc
Is there a way to cache metadata, result and query stuff with propel instead of Doctrine?
The Opcache built into recent PHP versions doesn't provide APC-like user storage - it's just for the bytecode caching. You can install ApcU, to use the APC cache driver, but otherwise, you'll want to select a different cache mechanism.
It won't be so much of an issue for the ClassLoader, since that is already handled by Composer optimisation and the Opcache, but will be useful for the other caching.