File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,12 @@ Read more about opcode caches:
15
15
16
16
* [ Zend OPcache] [ opcache-book ] (bundled with PHP since 5.5)
17
17
* Zend OPcache (formerly known as Zend Optimizer+) is now [ open source] [ Zend Optimizer+ ]
18
- * [ APC] - PHP 5.4 and earlier
19
18
* [ WinCache] (extension for MS Windows Server)
20
19
* [ list of PHP accelerators on Wikipedia] [ PHP_accelerators ]
21
20
* [ PHP Preloading] - PHP >= 7.4
22
21
23
22
24
23
[ opcache-book ] : https://secure.php.net/book.opcache
25
- [ APC ] : https://www.php.net/book.apcu
26
24
[ Zend Optimizer+ ] : https://github.com/zendtech/ZendOptimizerPlus
27
25
[ WinCache ] : https://www.iis.net/downloads/microsoft/wincache-extension
28
26
[ PHP_accelerators ] : https://wikipedia.org/wiki/List_of_PHP_accelerators
Original file line number Diff line number Diff line change @@ -33,22 +33,22 @@ Example logic using APCu:
33
33
{% highlight php %}
34
34
<? php
35
35
// check if there is data saved as 'expensive_data' in cache
36
- $data = apc_fetch ('expensive_data');
36
+ $data = apcu_fetch ('expensive_data');
37
37
if ($data === false) {
38
38
// data is not in cache; save result of expensive call for later use
39
- apc_add ('expensive_data', $data = get_expensive_data());
39
+ apcu_add ('expensive_data', $data = get_expensive_data());
40
40
}
41
41
42
42
print_r($data);
43
43
{% endhighlight %}
44
44
45
- Note that prior to PHP 5.5, APC provides both an object cache and a bytecode cache. APCu is a project to bring APC's
45
+ Note that prior to PHP 5.5, there was APC extension which provided both an object cache and a bytecode cache. The new APCu is a project to bring APC's
46
46
object cache to PHP 5.5+, since PHP now has a built-in bytecode cache (OPcache).
47
47
48
48
### Learn more about popular object caching systems:
49
49
50
50
* [APCu](https://github.com/krakjoe/apcu)
51
- * [APC Functions ](https://secure .php.net/ref.apc )
51
+ * [APCu Documentation ](https://www .php.net/apcu )
52
52
* [Memcached](https://memcached.org/)
53
53
* [Redis](https://redis.io/)
54
54
* [WinCache Functions](https://secure.php.net/ref.wincache)
You can’t perform that action at this time.
0 commit comments