什么是PHP中的userland缓存APCu扩展? [英] What is userland caching APCu extension in PHP?

查看:113
本文介绍了什么是PHP中的userland缓存APCu扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是一个与OPcache相关的问题,原因是我不了解它,并在Google上找到了答案:

Just a question related to OPcache cause I didn't understand it and find an answer on Google:

当我们谈论用户空间缓存时,这是什么意思?我知道PHP已预先捆绑了新的Zend OPcache扩展,并且该扩展会将操作代码缓存到ram中,以免给处理器带来过多压力,该处理器应在每次请求时将其转换为操作代码, 但是当他们说APCu实现了用户域缓存时,该怎么办?

When we talk about userland caching, what does it mean? I know PHP is pre-bundled with the new Zend OPcache extension and that this extension caches op code into ram in order not to stress too much the processor which should convert to op code the PHP source at every request, but what about the APCu when they say that it implements userland caching?

什么是userland缓存?是否可以将APCu和Zend OPcache保持在一起?应该使用Zend OPcache代替APCu吗?

What is userland caching? Is it possible to keep APCu and Zend OPcache together, or not? Should Zend OPcache be used instead of APCu?

推荐答案

APCu确实是Joe Watkins为响应OPcache而开发的. APC同时支持操作码缓存和数据缓存,但是自PHP 5.4起,APC就一直在支持操作码缓存方面遇到稳定性问题. Zend Inc打开Opcache的源代码并将其置于PHP许可之下之后,它成为PHP 5.5的核心和首选操作码缓存. 但是它仅支持操作码缓存,不支持数据缓存.

APCu was really developed by Joe Watkins in response to OPcache. APC supports both opcode caching and data caching, but has been dogged with stability problems in support opcode caching since PHP 5.4. After Zend Inc opened the source of Opcache and placed it under the PHP licence, it became the core and preferred opcode cache from PHP 5.5. But it only supports opcode caching and not data caching.

Joe的APCu本质上是APC的剥离版本,仅包含数据缓存代码,并且设计为与侧面OpCache 一起使用,如果您需要数据缓存.

Joe's APCu is in essence a stripped out version of APC that only includes the data caching code, and is designed to be used along side OpCache if you need data caching.

请注意,虽然操作码缓存在源代码级别是透明的,但数据缓存不是透明的.您的应用程序需要进行显式编码才能使用. (尽管标准的PHP应用程序(如Wordpress,Drupal,phpBB,MediaWiki等)默认情况下都包含此支持.)

Note that whereas Opcode caching is transparent at a source code level, data caching is not. Your application needs to be coded explicitly to use it. (Though standard PHP apps such as Wordpress, Drupal, phpBB, MediaWiki, ... include this support by default).

这篇关于什么是PHP中的userland缓存APCu扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆