<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Some Notes on HttpContext.Cache</title>
	<link>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/</link>
	<description>Notes on web application design using .NET and XHTML</description>
	<pubDate>Fri, 30 Jul 2010 07:03:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: optimizing XSL in .NET 2.0 at Dylan Marks on Web Application Development</title>
		<link>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/#comment-1392</link>
		<dc:creator>optimizing XSL in .NET 2.0 at Dylan Marks on Web Application Development</dc:creator>
		<pubDate>Wed, 09 May 2007 19:08:30 +0000</pubDate>
		<guid>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/#comment-1392</guid>
		<description>[...] You may find my notes on httpcontext.cache&#160;helpful.    Tags: .net, caching, optimization, profiling, tools.      var blogTool = "WordPress"; var blogURL = "http://www.dioramadesign.net/blog"; var blogTitle = "Dylan Marks on Web Application Development"; var postURL = "http://www.dioramadesign.net/blog/optimizing-xsl-in-net-20/"; var postTitle = "optimizing XSL in .NET 2.0"; var commentAuthorFieldName = "author"; var commentAuthorLoggedIn = false; var commentFormID = "commentform"; var commentTextFieldName = "comment"; var commentButtonName = "submit"; [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] You may find my notes on httpcontext.cache&nbsp;helpful.    Tags: .net, caching, optimization, profiling, tools.      var blogTool = &#8220;WordPress&#8221;; var blogURL = &#8220;http://www.dioramadesign.net/blog&#8221;; var blogTitle = &#8220;Dylan Marks on Web Application Development&#8221;; var postURL = &#8220;http://www.dioramadesign.net/blog/optimizing-xsl-in-net-20/&#8221;; var postTitle = &#8220;optimizing XSL in .NET 2.0&#8243;; var commentAuthorFieldName = &#8220;author&#8221;; var commentAuthorLoggedIn = false; var commentFormID = &#8220;commentform&#8221;; var commentTextFieldName = &#8220;comment&#8221;; var commentButtonName = &#8220;submit&#8221;; [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dmarks</title>
		<link>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/#comment-641</link>
		<dc:creator>dmarks</dc:creator>
		<pubDate>Wed, 18 Apr 2007 17:38:06 +0000</pubDate>
		<guid>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/#comment-641</guid>
		<description>Well, when you retrieve into an object, you aren't going back a second time to the cache to actually work with the cached item. This avoids a race condition in that rare time that the value of the cache changes in the microsecond between checking if it is null and actually using it. 

This pattern is also explained here:
http://scottcate.mykb.com/Article_5CB26.aspx

I actually second guessed myself about this after your comment, thinking that maybe retrieving into an object would be only a reference.  But no, when you retrieve the cached item into an object, if the cache changes after that, it won't affect the value of the object. So you know for sure that if you check that the object is not null, then it isn't going to change on you a second later.</description>
		<content:encoded><![CDATA[<p>Well, when you retrieve into an object, you aren&#8217;t going back a second time to the cache to actually work with the cached item. This avoids a race condition in that rare time that the value of the cache changes in the microsecond between checking if it is null and actually using it. </p>
<p>This pattern is also explained here:<br />
<a href="http://scottcate.mykb.com/Article_5CB26.aspx" rel="nofollow">http://scottcate.mykb.com/Article_5CB26.aspx</a></p>
<p>I actually second guessed myself about this after your comment, thinking that maybe retrieving into an object would be only a reference.  But no, when you retrieve the cached item into an object, if the cache changes after that, it won&#8217;t affect the value of the object. So you know for sure that if you check that the object is not null, then it isn&#8217;t going to change on you a second later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hrusikesh</title>
		<link>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/#comment-640</link>
		<dc:creator>Hrusikesh</dc:creator>
		<pubDate>Wed, 18 Apr 2007 17:22:43 +0000</pubDate>
		<guid>http://www.dioramadesign.net/blog/some-notes-on-httpcontextcache/#comment-640</guid>
		<description>How does retrieving into an object avoid the issue?</description>
		<content:encoded><![CDATA[<p>How does retrieving into an object avoid the issue?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.100 seconds -->
