Zend 中的加速器当前状态如何?
I hear about accelerators such as these in PHP. I believe APC is making it to PHP 6 also.
What's the state of accelerators in Zend? I see a Zend_Cache. Is it the standard and is there more?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
通过 Zend_Cache_Backend_Apc 和 Zend_Cache_Backend_Xcache 支持 APC 和 Xcache
APC and Xcache are supported via Zend_Cache_Backend_Apc and Zend_Cache_Backend_Xcache
我想详细说明答案,因为 APC 和 Xcache 都提供用户缓存和操作码缓存。如上所述,在 zend 中可以通过缓存后端访问用户缓存。
回复:加速和操作码缓存,我很幸运地在 mod_php 和 fastcgi/fpm 环境中运行带有 Xcache/fastcgi 的 zf 以及 APC。我听说 APC 与 zend optimizationr 不兼容,因此值得指出(不是特定于 zf)。我从来没有用过加速器。
另一件需要提到的事情是,在 fastcgi 环境中设置操作码缓存时,每个 cgi 后端最终将有 1 个缓存,因此在我看来,使用 php-fpm 是最佳选择。
I wanted to elaborate on the answer as APC and Xcache provide both a user cache and an opcode cache. The user cache is accessible in zend via the cache backends as mentioned above.
Re: acceleration and opcode caching, I've had good luck with running zf with Xcache/fastcgi as well as APC in both mod_php and fastcgi/fpm environments. I've heard APC is not compatible with zend optimizer so thats worth pointing out (not specific to zf). I've never used eaccelerator.
One other thing to mention is when setting up opcode caching in a fastcgi env., you are going to end up with 1 cache per cgi backend so using php-fpm is the way to go IMO.