<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Caching is easy; Expiration is hard</title>
	<atom:link href="http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/feed/" rel="self" type="application/rss+xml" />
	<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/</link>
	<description>because at 3am anything sounds good</description>
	<lastBuildDate>Thu, 13 May 2010 02:29:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: All Night Diner : AMO Development Changes in 2010</title>
		<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/comment-page-1/#comment-48671</link>
		<dc:creator>All Night Diner : AMO Development Changes in 2010</dc:creator>
		<pubDate>Tue, 17 Nov 2009 21:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/#comment-48671</guid>
		<description>[...] huge arrays as a response there was no effective way to invalidate the cache we were using (see: Caching is easy; Expiration is hard). The DB layer should return objects that are easy to cache and easy to invalidate. The built-in [...]</description>
		<content:encoded><![CDATA[<p>[...] huge arrays as a response there was no effective way to invalidate the cache we were using (see: Caching is easy; Expiration is hard). The DB layer should return objects that are easy to cache and easy to invalidate. The built-in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaver</title>
		<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/comment-page-1/#comment-2815</link>
		<dc:creator>shaver</dc:creator>
		<pubDate>Thu, 24 Apr 2008 02:18:15 +0000</pubDate>
		<guid isPermaLink="false">http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/#comment-2815</guid>
		<description>Yeah, search sucks because you need to invalidate basically every search that hit on either the old or new version of the data.  When Laura reinvents search, I&#039;m sure she&#039;ll find a good way to solve that. :)</description>
		<content:encoded><![CDATA[<p>Yeah, search sucks because you need to invalidate basically every search that hit on either the old or new version of the data.  When Laura reinvents search, I&#8217;m sure she&#8217;ll find a good way to solve that. <img src='http://micropipes.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wil Clouser</title>
		<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/comment-page-1/#comment-2810</link>
		<dc:creator>Wil Clouser</dc:creator>
		<pubDate>Wed, 23 Apr 2008 22:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/#comment-2810</guid>
		<description>&lt;blockquote&gt;One idea is the construct the key for the data you’re caching in a way that it is the same, regardless on where you get the data from (which is often irrelevant as you point out). For example, an addon’s uuid+”title” to get its title?&lt;/blockquote&gt;

It&#039;s a nice idea, but with the way CakePHP works (straight queries with joins, etc. to the database) it wouldn&#039;t work.  We&#039;d have to rewrite a lot of the core Cake code.

It&#039;s actually a pretty similar idea to what the patch does - it stores arrays of the query hashes themselves so we can invalidate them later (using a reproducible key).  I wrote a few paragraphs about what it did but it seemed a little long winded for the original post.  I put the description in &lt;a href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=425315#c8&quot; rel=&quot;nofollow&quot;&gt;bug 425315 comment #8&lt;/a&gt; instead.</description>
		<content:encoded><![CDATA[<blockquote><p>One idea is the construct the key for the data you’re caching in a way that it is the same, regardless on where you get the data from (which is often irrelevant as you point out). For example, an addon’s uuid+”title” to get its title?</p></blockquote>
<p>It&#8217;s a nice idea, but with the way CakePHP works (straight queries with joins, etc. to the database) it wouldn&#8217;t work.  We&#8217;d have to rewrite a lot of the core Cake code.</p>
<p>It&#8217;s actually a pretty similar idea to what the patch does &#8211; it stores arrays of the query hashes themselves so we can invalidate them later (using a reproducible key).  I wrote a few paragraphs about what it did but it seemed a little long winded for the original post.  I put the description in <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=425315#c8" rel="nofollow">bug 425315 comment #8</a> instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wil Clouser</title>
		<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/comment-page-1/#comment-2809</link>
		<dc:creator>Wil Clouser</dc:creator>
		<pubDate>Wed, 23 Apr 2008 22:37:55 +0000</pubDate>
		<guid isPermaLink="false">http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/#comment-2809</guid>
		<description>&lt;blockquote&gt;For the different-links-for-different-people case, I would suggest creating a single page with everything in it, and then serving hide-admin/hide-developer/hide-localizer CSS rules in a tiny non-cached CSS file for the current user if they’re logged in. You can do the same with JS to stick the user’s name in the right place if needed. &lt;noscript&gt; blocks in the content can provide a boring-but-workable alternative for the few who turn off JS for the site.&lt;/blockquote&gt;

I think we&#039;re starting to do this in a few places already as we rewrite stuff, but it&#039;s definitely a direction I see us going.

&lt;blockquote&gt;If you just invalidated the main add-on page on any developer edit, and the rec-list/front page, but left search to expire over 15 mins or whatever, do you think that people would still complain?&lt;/blockquote&gt;

Heh, probably ;), but it would be much more reasonable that what we have.  If we can expire the main add-on page and the API (both relatively easy compared to search) I think we&#039;d be in a pretty good place.</description>
		<content:encoded><![CDATA[<blockquote><p>For the different-links-for-different-people case, I would suggest creating a single page with everything in it, and then serving hide-admin/hide-developer/hide-localizer CSS rules in a tiny non-cached CSS file for the current user if they’re logged in. You can do the same with JS to stick the user’s name in the right place if needed. &lt;noscript&gt; blocks in the content can provide a boring-but-workable alternative for the few who turn off JS for the site.</p></blockquote>
<p>I think we&#8217;re starting to do this in a few places already as we rewrite stuff, but it&#8217;s definitely a direction I see us going.</p>
<blockquote><p>If you just invalidated the main add-on page on any developer edit, and the rec-list/front page, but left search to expire over 15 mins or whatever, do you think that people would still complain?</p></blockquote>
<p>Heh, probably <img src='http://micropipes.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> , but it would be much more reasonable that what we have.  If we can expire the main add-on page and the API (both relatively easy compared to search) I think we&#8217;d be in a pretty good place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Håkan W</title>
		<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/comment-page-1/#comment-2808</link>
		<dc:creator>Håkan W</dc:creator>
		<pubDate>Wed, 23 Apr 2008 22:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/#comment-2808</guid>
		<description>One idea is the construct the key for the data you&#039;re caching in a way that it is the same, regardless on where you get the data from (which is often irrelevant as you point out). For example, an addon&#039;s uuid+&quot;title&quot; to get its title?

Also, instant invalidation is not necessary if you do the above, and make sure to overwrite the previous entry as soon as it is updated with the new value.</description>
		<content:encoded><![CDATA[<p>One idea is the construct the key for the data you&#8217;re caching in a way that it is the same, regardless on where you get the data from (which is often irrelevant as you point out). For example, an addon&#8217;s uuid+&#8221;title&#8221; to get its title?</p>
<p>Also, instant invalidation is not necessary if you do the above, and make sure to overwrite the previous entry as soon as it is updated with the new value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shaver</title>
		<link>http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/comment-page-1/#comment-2807</link>
		<dc:creator>shaver</dc:creator>
		<pubDate>Wed, 23 Apr 2008 22:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://micropipes.com/blog/2008/04/23/caching-is-easy-expiration-is-hard/#comment-2807</guid>
		<description>For the different-links-for-different-people case, I would suggest creating a single page with everything in it, and then serving hide-admin/hide-developer/hide-localizer CSS rules in a tiny non-cached CSS file for the current user if they&#039;re logged in.  You can do the same with JS to stick the user&#039;s name in the right place if needed.  &lt;noscript&gt; blocks in the content can provide a boring-but-workable alternative for the few who turn off JS for the site.

Explicit invalidation is definitely the way to go, if you can do it, but as you say that requires a fair amount of book-keeping to know what gets invalidated when.  Does search invalidation need to be on the same schedule? If you just invalidated the main add-on page on any developer edit, and the rec-list/front page, but left search to expire over 15 mins or whatever, do you think that people would still complain?  It would not be Truly Pure, but the main use cases (I made a change to my add-on, and want to make sure it looks OK, etc.) would seem to be well-served.</description>
		<content:encoded><![CDATA[<p>For the different-links-for-different-people case, I would suggest creating a single page with everything in it, and then serving hide-admin/hide-developer/hide-localizer CSS rules in a tiny non-cached CSS file for the current user if they&#8217;re logged in.  You can do the same with JS to stick the user&#8217;s name in the right place if needed.  &lt;noscript&gt; blocks in the content can provide a boring-but-workable alternative for the few who turn off JS for the site.</p>
<p>Explicit invalidation is definitely the way to go, if you can do it, but as you say that requires a fair amount of book-keeping to know what gets invalidated when.  Does search invalidation need to be on the same schedule? If you just invalidated the main add-on page on any developer edit, and the rec-list/front page, but left search to expire over 15 mins or whatever, do you think that people would still complain?  It would not be Truly Pure, but the main use cases (I made a change to my add-on, and want to make sure it looks OK, etc.) would seem to be well-served.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
