Rephrase Object Caching section a little, improve phrasing/grammar

This commit is contained in:
Ken Guest
2025-01-03 23:39:16 +00:00
parent 2d288e79b4
commit afbe01793c

View File

@@ -22,9 +22,9 @@ hyper-fast data store in a central location and many different systems can pull
Note that whether the cache is shared across PHP processes depends on how PHP is used. When running PHP via PHP-FPM, Note that whether the cache is shared across PHP processes depends on how PHP is used. When running PHP via PHP-FPM,
the cache is shared across all processes of all pools. When running PHP as a (Fast-)CGI application inside your the cache is shared across all processes of all pools. When running PHP as a (Fast-)CGI application inside your
webserver, the cache is not shared, i.e every PHP process will have its own APCu data. When running PHP as a command webserver, the cache is not shared, i.e every PHP process will have its own APCu data. When running PHP on the command
line, the cache is not shared and will only exist for the duration of the command. So you have to be mindful of your line, the cache is not shared and will only exist for the duration of the command, so you have to be mindful of your
situation and goals. And you might want to consider using memcached instead, as it's not tied to the PHP processes. situation and goals. You might want to consider using memcached instead, as it's not tied to the PHP processes.
In a networked configuration APCu will usually outperform memcached in terms of access speed, but memcached will be In a networked configuration APCu will usually outperform memcached in terms of access speed, but memcached will be
able to scale up faster and further. If you do not expect to have multiple servers running your application, or do not able to scale up faster and further. If you do not expect to have multiple servers running your application, or do not
@@ -44,9 +44,6 @@ if ($data === false) {
print_r($data); print_r($data);
{% endhighlight %} {% endhighlight %}
Note that prior to PHP 5.5, there was the APC extension which provided both an object cache and a bytecode cache. The new APCu is a project to bring APC's
object cache to PHP 5.5+, since PHP now has a built-in bytecode cache (OPcache).
### Learn more about popular object caching systems: ### Learn more about popular object caching systems:
* [APCu](https://github.com/krakjoe/apcu) * [APCu](https://github.com/krakjoe/apcu)