It has been about 5 months since the first announcement of XCache. But many of you may still wonder how XCache “looks” like. So i’ve spent some hours and finally setup Administration demo page and Coverage viewer demo page
XCache was stable (the cacher stufs), but now becomes more stable (installing, configuring), and seems a bit hot recently if you may google for “php” +“xcache” :)
Thanks for your support and encourage, XCache will goes on and on..
I'm sure you use lighttpd because of performance and scalability, and many of you run php too. I'm please to introduce you another opcode cache for php.
Yes, another.
The preview version is deprecated. please check http://trac.lighttpd.net/xcache/wiki/GettingSource to get newer source.
and report problems at http://trac.lighttpd.net/xcache/newticket
I myself, have used apc, mmcache/ea, ZendOptimizer, The only 3 choices before xcache. ab cache is too old and dead, saidly, before i use it. Every one of u write php script know them, and have one if them boost your php performance, because they're good.
But "What? Why you just introduce another opcode cacher?" It take some time to explain ... the short term: it give you one more choice. the long term: mmcache/ea is the most optimized php-opcache. ZendOptimizer isn't pre-built on all platform -- they release binary not source file. apc was stable on php4 but not works with php5, and now, is said works with php5 but php4 is left to desert...
$ grep proto *.c
mixed xcache_get(string name)
bool xcache_set(string name, mixed value [, int ttl])
mixed xcache_isset(string name)
bool xcache_unset(string name)
int xcache_inc(string name [, int value [, int ttl]])
int xcache_dec(string name [, int value [, int ttl]])
other proto need documented.
$ wget http://blog.lighttpd.net/files/xcache-preview.tar.gz
$ tar -zxf xcache-preview.tar.gz
$ cd xcache-preview
$ phpize
$ cat ./conf
$ ./configure --help
$ ./configure --enable-xcache-disassembler
$ make
$ su
# make install
take care about the output of make install append the following to php.ini:
[xcache]
xcache.size = 64M
xcache.mmap_path = "/tmp/xcache"
xcache.cacher = 1
zend_extension="/usr/.../extensions/..../xcache.so"
# or
extension="xcache.so"
restart your php (fastcgi or mod_php), check output for xcache status. if you see it there, you're done.
and finally test the opcode dumper:
$ ./phpdop.phpr ./phpdop.phpr
$ ./phpdc.phpr ./phpdc.phpr
Index: processor.m4
===================================================================
--- processor.m4 (revision 27)
+++ processor.m4 (working copy)
@@ -575,6 +575,9 @@
/* reserved */
DONE(reserved)
+ #if defined(HARDENING_PATCH) && HARDENING_PATCH
+ DISPATCH(zend_bool, created_by_eval)
+ #endif
} while (0);
')
dnl }}}
it is suggested to modify processor/processor.m4 directly as there might be spaces lost in blog.