简体   繁体   English

在Zend Framework 2中配置APC

[英]Config apc in zend framework 2

我需要在zend framework 2 + doctrine 3项目中最大化性能 ,该应用程序运行缓慢,因此我已经为某些查询启用了内存缓存,还为配置文件启用了缓存...但是应用程序仍然速度很慢,因此在网上搜索时,我发现了一些有关执行zf2项目并提到apc的文章,它们使应用程序不太慢,因此我已经安装了apc ,但是我找不到方法来配置如何启用apczend Framework 2中

APC is a PHP extension, it's not something you need to enable within individual applications unless you're using it for userland caching as well (which I assume you are not, since you mentioned memcache). APC是一个PHP扩展,除非您也将其用于用户级缓存(除非您提到了memcache,否则我不需要),否则无需在单个应用程序中启用它。 You can check if it's working by firing up a phpinfo page and seeing if you have an APC section. 您可以通过启动phpinfo页面并查看是否具有APC部分来检查其是否正常工作。

If you have PHP 5.5 or above, you don't need (and shouldn't use) APC, as PHP comes with its own (better) opcache. 如果您具有PHP 5.5或更高版本,则不需要(也不应该使用)APC,因为PHP带有自己的(更好的)opcache。

I'd suggest you benchmark your application using something like XDebug to find out what is causing the slowness. 我建议您使用XDebug之类的工具对应用程序进行基准测试,以找出导致速度慢的原因。 This should give you a better idea what you need to improve. 这应该给您一个更好的主意,您需要改进什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM