<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MaisonBisson.com &#187; caching</title>
	<atom:link href="http://maisonbisson.com/blog/post/tag/caching/feed/" rel="self" type="application/rss+xml" />
	<link>http://maisonbisson.com</link>
	<description>A bunch of stuff I would have emailed you about.</description>
	<lastBuildDate>Sat, 14 Nov 2009 20:14:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixing Batcache to Send The Correct Content-Type Header</title>
		<link>http://maisonbisson.com/blog/post/13773/fixing-batcache-to-send-the-correct-content-type-header/</link>
		<comments>http://maisonbisson.com/blog/post/13773/fixing-batcache-to-send-the-correct-content-type-header/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 17:19:12 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[batcache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/?p=13773</guid>
		<description><![CDATA[
I&#8217;m a fan of Batcache, the Memcached-based WordPress full-page cache solution, but I&#8217;ve discovered that it ignores the content-type header set when the page is initially generated and re-sends all content with content-type: text/html. I posted a note about this at the WordPress support forums, but then I realized what the problem was: apache_response_headers() doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-13773"><!-- &nbsp; --></abbr>
<p>I&#8217;m a fan of <a href="http://wordpress.org/extend/plugins/batcache/" title="WordPress › Batcache « WordPress Plugins">Batcache</a>, the Memcached-based WordPress full-page cache solution, but I&#8217;ve discovered that it ignores the <code>content-type</code> header set when the page is initially generated and re-sends all content with <code>content-type: text/html</code>. I <a href="http://wordpress.org/support/topic/263161" title="WordPress › Support » Batcache ignores content type header, sends everything as text/html">posted a note about this</a> at the WordPress support forums, but then I realized what the problem was: <a href="http://php.net/apache_response_headers" title="PHP: apache_response_headers - Manual"><code>apache_response_headers()</code></a> doesn&#8217;t return the content type, but <a href="http://php.net/headers_list" title="PHP: headers_list - Manual"><code>headers_list()</code></a> does.</p>
<p>The solution is to replace <code>apache_response_headers()</code> with <code>headers_list()</code> <a href="http://plugins.trac.wordpress.org/browser/batcache/trunk/advanced-cache.php#L93" title="/batcache/trunk/advanced-cache.php – WordPress Plugin Repository">in the code</a>, though <code>headers_list()</code> is PHP 5+ only, so it might be a while before we see a change like this committed. Still, I&#8217;ll shamelessly tag <a href="http://andy.wordpress.com/" title="Andy Skelton">Andy Skelton</a> (Batcache&#8217;s author) on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/13773/fixing-batcache-to-send-the-correct-content-type-header/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Performance Tips</title>
		<link>http://maisonbisson.com/blog/post/12169/wordpress-performance-tips/</link>
		<comments>http://maisonbisson.com/blog/post/12169/wordpress-performance-tips/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 21:21:35 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Dispatches]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/?p=12169</guid>
		<description><![CDATA[
Elliott C. Back points to his use of object caching, WP-Cache, and MySQL query caching among the reasons why his site “is so much faster that yours.”
]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-12169"><!-- &nbsp; --></abbr>
<p><a href="http://elliottback.com/" title="Elliott C. Back">Elliott C. Back</a> points to his use of object caching, WP-Cache, and MySQL query caching among the reasons why his site “<a href="http://elliottback.com/wp/archives/2007/04/15/why-my-wordpress-site-is-so-much-faster-than-yours/">is so much faster that yours</a>.”</p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/12169/wordpress-performance-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.5 Out, MaisonBisson Upgraded</title>
		<link>http://maisonbisson.com/blog/post/12113/wordpress-25-out-maisonbisson-upgraded/</link>
		<comments>http://maisonbisson.com/blog/post/12113/wordpress-25-out-maisonbisson-upgraded/#comments</comments>
		<pubDate>Sun, 30 Mar 2008 06:38:06 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[concurrent editing protection]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress 2.5]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/?p=12113</guid>
		<description><![CDATA[
WordPress 2.5 is out (and the WordPress site got a facelift), and I&#8217;ve already upgraded MaisonBisson using SVN. The changes are exciting, and seem to reflect a tradition that&#8217;s developing in WordPress of delivering some really revolutionary features in the x.5 release.
The loss of file-based object caching was a bit of a problem, as my [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-12113"><!-- &nbsp; --></abbr>
<p><a href="http://wordpress.org/development/2008/03/wordpress-25-brecker/" title="WordPress › Blog » WordPress 2.5">WordPress 2.5</a> is out (and the <a href="http://wordpress.org/" title="WordPress › Blog Tool and Weblog Platform">WordPress</a> site got a facelift), and I&#8217;ve already upgraded MaisonBisson <a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">using SVN</a>. The changes are exciting, and seem to reflect a tradition that&#8217;s developing in WordPress of delivering some really revolutionary features in the x.5 release.</p>
<p>The loss of file-based object caching was a bit of a problem, as my <img src="http://www.lduhtrp.net/image-2621476-10436176" width="1" height="1" border="0"/><a href="http://www.anrdoezrs.net/click-2621476-10436176" target="_top">VPS</a>&#8217;s load average jumped to over 30 pretty quickly after the upgrade. I tried <a href="http://txfx.net/">Mark Jaquith</a>&#8217;s <a href="http://txfx.net/files/wordpress/apc-object-cache.phps" title="apc-object-cache.phps">apc-object-cache</a> enabler and saw load average drop back to 2 or so, but I also saw tag and category names disappear and discovered other weirdness. Why it happened I don&#8217;t know, but I&#8217;m looking into it. Fortunately, <a href="http://neosmart.net/" title="NeoSmart Technologies">NeoSmart</a>&#8217;s <a href="http://neosmart.net/blog/2008/file-based-extension-to-the-wordpress-object-cache/" title="File-Based Extension to the WordPress Object Cache — The NeoSmart Files">file-based object cache</a> replacement works perfectly and efficiently. (Mind you, <a href="http://boren.nu/" title="boren.nu">Ryan Boren</a> thinks <a href="http://boren.nu/archives/2007/06/11/wordpress-schwag-cache/" title="» WordPress Schwag Cache boren.nu">WordPress caches should require more adventure</a>.)</p>
<p><a href="http://maisonbisson.com/blog/bsuite">bSuite</a> seems to work perfectly in 2.5, though the new <a href="http://codex.wordpress.org/Shortcode_API" title="Shortcode API « WordPress Codex">shortcode API</a> obviates one of <a href="http://maisonbisson.com/blog/bsuite/tokens">bSuite&#8217;s coolest features: tokens</a>. Still, it&#8217;s better to run with the herd, so I&#8217;ll be transitioning bSuite&#8217;s built in tokens to take advantage of the shortcode API soon.</p>
<p>One of the features that&#8217;s not received much attention yet, but is hugely valuable to those (like me) who are using and advocating for WordPress as a general purpose CMS, is the concurrent editing protection. That is, if another WordPress author is editing a story, you can&#8217;t save changes to it until that editor is done. The next step for this is to allow concurrent team editing in <a href="http://www.google.com/support/writely/bin/answer.py?answer=44677&amp;topic=8625">the way Google Docs does</a> as well as versioning (versioning has been discussed as a feature for 2.6).</p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/12113/wordpress-25-out-maisonbisson-upgraded/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speedy PHP: Intermediate Code Caching</title>
		<link>http://maisonbisson.com/blog/post/10970/speedy-php-intermediate-code-caching/</link>
		<comments>http://maisonbisson.com/blog/post/10970/speedy-php-intermediate-code-caching/#comments</comments>
		<pubDate>Thu, 31 May 2007 15:10:08 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[acceleration]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[intermediate code cache]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[scaling]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/post/10970/#speedy-php-intermediate-code-caching</guid>
		<description><![CDATA[
I&#8217;ve been working on MySQL optimization for a while, and though there&#8217;s still more to done on that front, I&#8217;ve gotten to the point where the the cumulative query times make up less than half of the page generation time.
So I&#8217;m optimizing code when the solution is obvious (and I hope to rope Zach into [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-10970"><!-- &nbsp; --></abbr>
<p>I&#8217;ve been working on MySQL optimization for a while, and though there&#8217;s still more to done on that front, I&#8217;ve gotten to the point where the the cumulative query times make up less than half of the page generation time.</p>
<p>So I&#8217;m optimizing code when the solution is obvious (and I hope to rope <a href="http://nosheep.net/">Zach</a> into giving the code a performance audit soon), but I&#8217;m also looking at optimizing how PHP works.</p>
<p>Once upon a time, most of us ran PHP as a CGI, and every time a request came in, the PHP interpreter would have to launch, read/compile/execute the script, then spit out the result and shutdown. Now (hopefully) everybody&#8217;s running PHP as an Apache module, so all the time spent launching the interpreter, allocating memory and other resources for it, and then shutting it down and cleaning up after it, is done just once for each thread of Apache.</p>
<p>It might not sound like much, but I had a chance to compare CGI vs. module performance recently and found that a fairly simple, but frequently accessed script running as a CGI completely swamped a server as a CGI (creating a load average over 20), but was hardly noticed when running as a module. </p>
<p>But even as a module, the PHP scripts still need to be interpreted and compiled before they can be executed. And because of the way PHP works, this is done every time the page/script is requested.</p>
<p>Java programmers, among others, criticize PHP for this, but that <a href="http://www.37signals.com/svn/archives2/fear_shark_attacks_and_will_it_scale.php">small inefficiency</a> is part of what makes PHP so easy to use (and popular). And that ease of use means people are building some really interesting <a href="http://gettingreal.37signals.com/ch04_Scale_Later.php">apps worth scaling</a>.</p>
<p>Anyway, there&#8217;s a solution to eliminate that inefficiency in PHP: intermediate code caching.</p>
<p>By caching the executable code generated by the interpreter, then the using the cached copy instead of the source script for the next request, you can enjoy the benefits of PHP&#8217;s easy development and compiled code&#8217;s fast execution time. A number of projects all promise anywhere from double to 10X jump in performance.</p>
<ul>
<li><a href="http://www.php-accelerator.co.uk/" title="The ionCube PHP Accelerator: Home">ionCube PHP Accelerator</a><br />This has the most recognizable “brand,” and some hosting providers even offer it, but it&#8217;s offered <a href="http://phprpms.sourceforge.net/phpa">only in binary form</a> and <a href="http://www.php-accelerator.co.uk/faq.php#license">the license</a> seems intentionally ambiguous (um, <a href="http://www.fsf.org/licensing/essays/free-sw.html">not free</a>?).</li>
<li><a href="http://sourceforge.net/projects/turck-mmcache/" title="SourceForge.net: Turck MMCache for PHP">Turck MMCache for PHP</a><br />Has a good <a href="http://turck-mmcache.sourceforge.net/index_old.html">performance chart</a>, and is GPL&#8217;d, but development appears to have ended in 2003.</li>
<li><a href="http://web.archive.org/web/20040401135239/bwcache.bware.it/cache.htm">afterBURNERr*Cache</a><br />Yeah, I had to point to a page in the Wayback Machine, this project is dead.</li>
<li><a href="http://www.zend.com/products/zend_platform/">Zend Platform Performance Suite</a><br />A commercial suite that includes <a href="http://www.zend.com/products/zend_platform/features_comparison">piles of goodies</a>, if you pay.</li>
<li><a href="http://pecl.php.net/package/apc" title="PECL :: Package :: APC">APC: Alternative PHP Cache</a><br />It&#8217;s under active development and includes Rasmus Lerdorf, the guy who created PHP, among the project leads. License: <a href="http://www.php.net/license/2_02.txt">BSD-style</a> (<a href="http://www.gnu.org/philosophy/license-list.html">non-copyleft</a>)</li>
</ul>
<p>I haven&#8217;t actually tried any of these yet, but I&#8217;m looking for information and suggestions, and I&#8217;m likely to try APC, maybe even Zend soon. Just as soon as I make an app compelling enough (and large enough) to need it.</p>
<p><tags>php, caching, acceleration, zend, apc, intermediate code cache, optimization, scaling, web applications</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/10970/speedy-php-intermediate-code-caching/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Memcached and Wordpress</title>
		<link>http://maisonbisson.com/blog/post/11489/memcached-and-wordpress/</link>
		<comments>http://maisonbisson.com/blog/post/11489/memcached-and-wordpress/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 17:17:04 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/post/11489/</guid>
		<description><![CDATA[
Ryan Boren wrote about using memcached with WordPress almost a year ago:
Memcached is a distributed memory object caching system. WordPress 2.0 can make use of memcached by dropping in a special backend for the WP object cache. The memcached backend replaces the default backend and directs all cache requests to one or more memcached daemons. [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-11489"><!-- &nbsp; --></abbr>
<p><a href="http://boren.nu//">Ryan Boren</a> <a href="http://ryan.wordpress.com/2005/12/23/memcached-backend/" title="Memcached Backend « Ryan on WordPress">wrote about using</a> <a href="http://www.danga.com/memcached/" title="memcached: a distributed memory object caching system">memcached</a> with WordPress almost a year ago:</p>
<blockquote><p>Memcached is a distributed memory object caching system. WordPress 2.0 can make use of memcached by dropping in a special backend for the WP object cache. The memcached backend replaces the default backend and directs all cache requests to one or more memcached daemons. You must have a memcached daemon running somewhere for this to work. Unless you’re managing the server on which your blog is running, you probably can’t run a memcached daemon, making this backend useless to you. The memcached backend is targeted at ISPs and those running WPMU. If you are using WPMU and distributing DB requests across multiple servers, memcached will come in very handy. Using memcached for a single blog isn’t really worth it. In my tests, it was sometimes slower than using the default object cache backend.</p></blockquote>
<p>The <a href="http://dev.wp-plugins.org/browser/memcached/" title="/memcached/ - WordPress Plugin Repository - Trac">plugin is here</a>, a <a href="http://mu.wordpress.org/forums/topic.php?id=1424" title="WordPress MU › memcached mod « WordPress MU Forums">bug-fix note is here</a>.</p>
<p><tags>WordPress, memcached, optimization, caching</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/11489/memcached-and-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>