using APC as content-cache?
| From: | Andreas Korthaus | Date: | Thu, 28 Apr 2005 17:02:07 +0000 |
| Subject: | using APC as content-cache? | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-2313@lists.php.net to get a copy of this message | ||
Hello!
With Turck mmCache/eAccelerator you can do something like that:
eaccelerator_cache_page(
$_SERVER['PHP_SELF'].'?GET='.serialize($_GET), 1800);
This will cache the whole output of this php-script for 1800 seconds.
Caching the whole output seems to be very useful:
Requests to index.php of phpmyadmin: (requests/second)
php without any cache: 8.91
php with opcode-cache: 43.27
php with content-cache: 543.48
from: http://turck-mmcache.sourceforge.net/index_old.html#bench
I have had a look at php_apc.c where I could find some PHP-functions of APC, but nothing like apc_cache_page() or something like that.
Is there any possibility to cache a whole page? Of course you could use ob-functions with apc_fetch/apc_store, but this would be implemented in php and by far not as fast as eAccelerator.
best regards
Andreas