<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>lighty's life: Tag xcache</title>
    <link>http://blog.lighttpd.net/articles/tag/xcache</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>XCache's demo</title>
      <description>&lt;p&gt;It has been about 5 months since the &lt;a href="http://blog.lighttpd.net/articles/2006/04/04/one-more-opcache-for-php-preview"&gt;first announcement of XCache&lt;/a&gt;.
But many of you may still wonder how XCache &amp;#8220;looks&amp;#8221; like. So i&amp;#8217;ve spent some hours and finally setup &lt;a href="http://trac.lighttpd.net/xcache-php/admin/"&gt;Administration demo page&lt;/a&gt; and
&lt;a href="http://trac.lighttpd.net/xcache-php/coverager/"&gt;Coverage viewer demo page&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;XCache was stable (the cacher stufs), but now becomes more stable (installing, configuring), and seems a bit hot recently if you may google for &amp;#8220;php&amp;#8221; +&amp;#8220;xcache&amp;#8221; :)&lt;/p&gt;


	&lt;p&gt;Thanks for your support and encourage, XCache will goes on and on..&lt;/p&gt;
</description>
      <pubDate>Sun, 17 Sep 2006 10:01:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:9b3393ba-5aad-4687-8f8a-7988de4ef0e6</guid>
      <author>moo</author>
      <link>http://blog.lighttpd.net/articles/2006/09/17/xcaches-demo</link>
      <category>xcache</category>
      <category>xcache</category>
      <trackback:ping>http://blog.lighttpd.net/articles/trackback/1997</trackback:ping>
    </item>
    <item>
      <title>One more opcache for php (Preview)</title>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Yes, &lt;a href="http://blog.lighttpd.net/articles/2006/04/04/one-more-opcache-for-php-preview"&gt;another&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The preview version is deprecated. please check http://trac.lighttpd.net/xcache/wiki/GettingSource to get newer source.&lt;/p&gt;

&lt;p&gt;and report problems at http://trac.lighttpd.net/xcache/newticket&lt;/p&gt;
&lt;h2&gt;Introducing&lt;/h2&gt;

&lt;p&gt;I myself, have used &lt;a href="http://pecl.php.net/apc"&gt;apc&lt;/a&gt;, mmcache/&lt;a href="http://www.eaccelerator.net/"&gt;ea&lt;/a&gt;, &lt;a href="http://www.zend.com/"&gt;ZendOptimizer&lt;/a&gt;, 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. &lt;/p&gt;

&lt;p&gt;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...&lt;/p&gt;

&lt;h2&gt;Highlight spot of xcache&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;cacher, similar as other opcaches.&lt;/li&gt;
&lt;li&gt;opcode disassembler, to see how your scripts looks after they're compiled into opcode.&lt;/li&gt;
&lt;li&gt;grows as php grows, using automated discover scheme by the devel, and the new changes to xcache to catch up new php version is brought to you easily.&lt;/li&gt;
&lt;li&gt;php4.x lastest is stably supported, php5.x lastest just works, php6-devel is supported for your further vision.&lt;/li&gt;
&lt;li&gt;many more ...&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;New function for script&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ 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]])
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;other proto need documented.&lt;/p&gt;

&lt;h2&gt;How to install&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ 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
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;take care about the output of make install
append the following to php.ini:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[xcache]
xcache.size = 64M
xcache.mmap_path = "/tmp/xcache"
xcache.cacher = 1
zend_extension="/usr/.../extensions/..../xcache.so"
# or
extension="xcache.so"
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Testing&lt;/h2&gt;

&lt;p&gt;restart your php (fastcgi or mod_php), check &lt;?php phpinfo() ?&gt; output for xcache status. if you see it there, you're done.&lt;/p&gt;

&lt;p&gt;and finally test the opcode dumper:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ./phpdop.phpr ./phpdop.phpr
$ ./phpdc.phpr ./phpdc.phpr
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Patch for hardened source (not tested)&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;Index: processor.m4
===================================================================
--- processor.m4    (revision 27)
+++ processor.m4    (working copy)
@@ -575,6 +575,9 @@

    /* reserved */
    DONE(reserved)
+ #if defined(HARDENING_PATCH) &amp;amp;&amp;amp; HARDENING_PATCH
+   DISPATCH(zend_bool, created_by_eval)
+ #endif
    } while (0);
 ')
 dnl }}}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;it is suggested to modify processor/processor.m4 directly as there might be spaces lost in blog.&lt;/p&gt;</description>
      <pubDate>Tue, 04 Apr 2006 04:36:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:02d3d114-3e91-493c-bcd0-b1dad2f846d3</guid>
      <author>moo</author>
      <link>http://blog.lighttpd.net/articles/2006/04/04/one-more-opcache-for-php-preview</link>
      <category>lighttpd</category>
      <category>xcache</category>
      <trackback:ping>http://blog.lighttpd.net/articles/trackback/170</trackback:ping>
    </item>
  </channel>
</rss>
