<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Caching in&#160;WordPress</title>
	<atom:link href="http://neodude.net/archives/2008/03/caching-in-wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://neodude.net/archives/2008/03/caching-in-wordpress</link>
	<description>Sorta has that smell of wood sawed by a machine, one that makes them all identical</description>
	<pubDate>Fri, 29 Aug 2008 01:35:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: neodude</title>
		<link>http://neodude.net/archives/2008/03/caching-in-wordpress#comment-3</link>
		<dc:creator>neodude</dc:creator>
		<pubDate>Tue, 01 Apr 2008 09:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://neodude.net/?p=11#comment-3</guid>
		<description>&lt;blockquote&gt;For a Digg event there will be just one cached version of the page—generate once, serve many—not a torrent of new cache entries.&lt;/blockquote&gt;

I didn't really explain myself very well here. With full-page caching, there'll be only one version of the page, but still hundreds of dead versions from the "first comment!" commenting – since the torrent of digg pageviews will invalidate everything else out of the cache.

Without full-page caching, it's even gloomier; hopefully some global variables (alloptions?) will be fairly unchanged.

Anywho – this all was a parenthetical to support that cache invalidation is likely to best be weighted entirely on how 'hot' each entry is (I had originally thought entries with more hits should stay for longer, but this example neatly invalidates (ha!) that idea).

&lt;blockquote&gt;Were you aware that $wp_object_cache-&gt;global_groups is unused? WordPress.com uses it to great effect.&lt;/blockquote&gt;

I knew it didn't feel particularly used. I suppose it only makes sense in a MU setting? I didn't know what 'global' meant; now I do, I think.

&lt;blockquote&gt;For example, if ( $group == ‘persistent’ ) { store in the database } else { store in memory }.&lt;/blockquote&gt;

Magic groups!

It seems a little rearchitecturing is in order; perhaps multiple backing storages can be implemented via configuration; there'll need to be a WP_Cache_Master to control all the WP_Cache_Database, WP_Cache_Memcached, etc.

Maybe make the Cache_Master as a plugin, and have it take many subclasses of WP_Cache_Base as different backing stores. The _Master configuration could specific which groups get stored where?</description>
		<content:encoded><![CDATA[<blockquote><p>For a Digg event there will be just one cached version of the page—generate once, serve many—not a torrent of new cache entries.</p></blockquote>
<p>I didn&#8217;t really explain myself very well here. With full-page caching, there&#8217;ll be only one version of the page, but still hundreds of dead versions from the &#8220;first comment!&#8221; commenting – since the torrent of digg pageviews will invalidate everything else out of the cache.</p>
<p>Without full-page caching, it&#8217;s even gloomier; hopefully some global variables (alloptions?) will be fairly unchanged.</p>
<p>Anywho – this all was a parenthetical to support that cache invalidation is likely to best be weighted entirely on how &#8216;hot&#8217; each entry is (I had originally thought entries with more hits should stay for longer, but this example neatly invalidates (ha!) that idea).</p>
<blockquote><p>Were you aware that $wp_object_cache->global_groups is unused? WordPress.com uses it to great effect.</p></blockquote>
<p>I knew it didn&#8217;t feel particularly used. I suppose it only makes sense in a MU setting? I didn&#8217;t know what &#8216;global&#8217; meant; now I do, I think.</p>
<blockquote><p>For example, if ( $group == ‘persistent’ ) { store in the database } else { store in memory }.</p></blockquote>
<p>Magic groups!</p>
<p>It seems a little rearchitecturing is in order; perhaps multiple backing storages can be implemented via configuration; there&#8217;ll need to be a WP_Cache_Master to control all the WP_Cache_Database, WP_Cache_Memcached, etc.</p>
<p>Maybe make the Cache_Master as a plugin, and have it take many subclasses of WP_Cache_Base as different backing stores. The _Master configuration could specific which groups get stored where?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Skelton</title>
		<link>http://neodude.net/archives/2008/03/caching-in-wordpress#comment-2</link>
		<dc:creator>Andy Skelton</dc:creator>
		<pubDate>Tue, 01 Apr 2008 06:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://neodude.net/?p=11#comment-2</guid>
		<description>&lt;blockquote&gt;if a slashdot effect yesterday caused one cache entry to be hit 10,000 times, today’s digg effect on a different page will quickly knock the old cache entry off – since the torrent of new cache entries created by the dugg page will give the slashdotted page’s caches the oldest last accessed date&lt;/blockquote&gt;

For a Digg event there will be just one cached version of the page---generate once, serve many---not a torrent of new cache entries.

&lt;blockquote&gt;Another way to implement this would be through the group mechanism already in WP_Object_Cache.&lt;/blockquote&gt;

I implemented it by passing arrays of tags to the group argument. We have some other logic piggy-backed on the group arg, so it seemed natural. The first array value is treated as a group. A private method constructs the cache array key out of the tags and their versions. Tags could be a separate argument but this was leaner---probably what you had in mind.

The things you can do with tag one---the group---are limited to your imagination. Were you aware that $wp_object_cache-&#62;global_groups is unused? WordPress.com uses it to great effect. It just occurred to me that in core you could have several cache stores lumped into one and use the group to determine what went where.

For example, if ( $group == 'persistent' ) { store in the database } else { store in memory }.</description>
		<content:encoded><![CDATA[<blockquote><p>if a slashdot effect yesterday caused one cache entry to be hit 10,000 times, today’s digg effect on a different page will quickly knock the old cache entry off – since the torrent of new cache entries created by the dugg page will give the slashdotted page’s caches the oldest last accessed date</p></blockquote>
<p>For a Digg event there will be just one cached version of the page&#8212;generate once, serve many&#8212;not a torrent of new cache entries.</p>
<blockquote><p>Another way to implement this would be through the group mechanism already in WP_Object_Cache.</p></blockquote>
<p>I implemented it by passing arrays of tags to the group argument. We have some other logic piggy-backed on the group arg, so it seemed natural. The first array value is treated as a group. A private method constructs the cache array key out of the tags and their versions. Tags could be a separate argument but this was leaner&#8212;probably what you had in mind.</p>
<p>The things you can do with tag one&#8212;the group&#8212;are limited to your imagination. Were you aware that $wp_object_cache-&gt;global_groups is unused? WordPress.com uses it to great effect. It just occurred to me that in core you could have several cache stores lumped into one and use the group to determine what went where.</p>
<p>For example, if ( $group == &#8216;persistent&#8217; ) { store in the database } else { store in memory }.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
