<?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>Life Scaling &#187; Wordpress</title>
	<atom:link href="http://orensol.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://orensol.com</link>
	<description>Oren Solomianik's Blog</description>
	<lastBuildDate>Mon, 21 Jun 2010 08:10:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Improving Wordpress Caching: Batcache and Redirects</title>
		<link>http://orensol.com/2009/09/15/improving-wordpress-caching-batcache-and-redirects/</link>
		<comments>http://orensol.com/2009/09/15/improving-wordpress-caching-batcache-and-redirects/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:27:33 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Memcached]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[batcache]]></category>
		<category><![CDATA[object cache]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wp-super-cache]]></category>
		<category><![CDATA[wp_redirect]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=279</guid>
		<description><![CDATA[<p>There&#8217;s a great plugin for Wordpress called <a href="http://wordpress.org/extend/plugins/batcache/" target="_blank">Batcache</a> by <a href="http://skeltoac.com/" target="_blank">Andy Skelton</a>, which uses memcached as the cache backend for object cache and full page caches. It&#8217;s a great piece of code, and using it is a must if you want a scalable distributed cache for your Wordpress install (avoiding the local [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-285" src="http://orensol.com/files/2009/09/BatmanAccent2-215x300.jpg" alt="Batman" width="215" height="300" />There&#8217;s a great plugin for Wordpress called <a href="http://wordpress.org/extend/plugins/batcache/" target="_blank">Batcache</a> by <a href="http://skeltoac.com/" target="_blank">Andy Skelton</a>, which uses memcached as the cache backend for object cache and full page caches. It&#8217;s a great piece of code, and using it is a must if you want a scalable distributed cache for your Wordpress install (avoiding the local file system caching <a href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">WP-Super-Cache</a> offers).</p>
<p>I&#8217;ve been running batcache for a while, and noticed that although I set up a query-heavy homepage to be cached for a long while, the homepage query was still running every couple of minutes. So after some digging and logging I came to realize that batcache was missing an important part &#8212; caching redirects.</p>
<p>Why is it important to cache redirects? Here&#8217;s an example. If I go to http://example.com/, my homepage will be cached. But when I go to http://www.example.com/, the homepage query still runs. This is because the default www to no-www redirect happens at &#8216;template-redirect&#8217; action time (with canonical_redirect()), which occurs after the main posts query is run. And, batcache wouldn&#8217;t cache the redirect itself nor would it associate the www with the no-www version (it differentiates pages by a couple of parameters, including HTTP_HOST, which is different in this case). So any request to http://www.example.com would actually first run the homepage query, then redirect to http://example.com and serve the cached version only then.</p>
<p>After a short correspondence with Andy, he committed a <a href="http://plugins.trac.wordpress.org/changeset/153608" target="_blank">changeset</a> to advanced-cache.php (and readme.txt <img src='http://orensol.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) that now enables to cache redirects (off by default, be sure to turn it on!). Great to see such responsiveness from a plugin author, and I hope it helps others as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/09/15/improving-wordpress-caching-batcache-and-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
