Symfony 2 apc缓存错误


Symfony 2 apc caching error

我将把我的Symfony 2项目转移到共享托管的生产环境中。当我执行文件app.php时,我得到的错误

 Fatal error: Call to undefined function Doctrine'Common'Cache'apc_fetch() in /data/web/virtuals/53627/virtual/www/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php on line 40

我联系了托管提供商,被告知他们不再使用APC缓存,这似乎已经过时了,所以他们采取了进一步的行动。

有没有任何方法可以使用Symfony+Doctrine省略APC缓存?

感谢

查看您的app/config.yml:Doctrine缓存驱动程序是非常可配置的,并且正如文档所述,您可以将它们设置为array。这看起来很像:

doctrine:
    orm:
        auto_mapping: true
        metadata_cache_driver: array
        query_cache_driver: array
        result_cache_driver: array

还要注意,这基本上是默认配置,所以默认配置必须被覆盖。