Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Doctrine orm 使用ZF2的生产缓存_Doctrine Orm_Zend Framework2_Memcached - Fatal编程技术网

Doctrine orm 使用ZF2的生产缓存

Doctrine orm 使用ZF2的生产缓存,doctrine-orm,zend-framework2,memcached,Doctrine Orm,Zend Framework2,Memcached,我目前正在准备一些软件投入生产,我想检查我的设置是否会得到优化,但当我运行以下命令时,我收到以下信息: php index.php orm:ensure-production-settings Metadata Cache uses a non-persistent cache driver, Doctrine\Common\Cache\ArrayCache. 我还使用-vvv尝试了上述命令,但输出是相同的 我开始检查我的代码,但我找不到在哪里使用任何ArrayCache 这是我的 我知道它在

我目前正在准备一些软件投入生产,我想检查我的设置是否会得到优化,但当我运行以下命令时,我收到以下信息:

php index.php orm:ensure-production-settings
Metadata Cache uses a non-persistent cache driver, Doctrine\Common\Cache\ArrayCache.
我还使用
-vvv
尝试了上述命令,但输出是相同的

我开始检查我的代码,但我找不到在哪里使用任何ArrayCache

这是我的

我知道它在工作,因为我可以检查Memcached系统中的密钥,我也可以看到性能的提高。根据我在网上找到的文档,我只能找到建议在哪里使用APC进行生产缓存

我目前正在使用最新的ZF2 2.3.3和最新的Doctrine 2运行PHP5.6.4。这当然会使APC不可用

我很好奇,当我运行
orm:assure production settings
命令时,是否有什么东西我遗漏了,或者我可以这样做,它可以让我确信条令缓存适合生产


也许条令只喜欢APC以获得最佳缓存…

检查您的模块顺序

module.config.php中的配置将被DoctrineModule覆盖

检查application.config.php,其顺序如下:

return [
'modules' => [
    'DoctrineModule',
    'DoctrineORMModule',

    //YOUR_MODULES_HERE! -> after DoctrineModule
]
];

事实上我就是这样得到的。DocrineModule和DoctrineOrmModule位于我调用的另一个模块OTDatabase之前,在这里我有我的实体和我的条令设置配置。转储完整的配置并检查其是否全部在…请参阅index.php中的代码