<?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: Amazing Caching Proxy in Java</title>
	<atom:link href="http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/</link>
	<description>No movement is faster than no movement</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:12:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cheind</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5352</link>
		<dc:creator>cheind</dc:creator>
		<pubDate>Sat, 27 Dec 2008 10:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5352</guid>
		<description>hi martin &amp; merry christmas,

you might consider some features of the memcache library for ruby (i.e. expiration you&#039;ll need sooner or later). Here&#039;s an application quite the same as yours http://refactormycode.com/codes/609-caching-methods.

Joined github? Can anyone here my echooooooo? :)</description>
		<content:encoded><![CDATA[<p>hi martin &amp; merry christmas,</p>
<p>you might consider some features of the memcache library for ruby (i.e. expiration you&#8217;ll need sooner or later). Here&#8217;s an application quite the same as yours <a href="http://refactormycode.com/codes/609-caching-methods" rel="nofollow">http://refactormycode.com/codes/609-caching-methods</a>.</p>
<p>Joined github? Can anyone here my echooooooo? <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5350</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 25 Dec 2008 20:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5350</guid>
		<description>This is not thread safe (HashMap has to be synchronized).
That&#039;ll make it potentially much slower in a multi-threaded application. ConcurrentHashMap might help.

- Anon</description>
		<content:encoded><![CDATA[<p>This is not thread safe (HashMap has to be synchronized).<br />
That&#8217;ll make it potentially much slower in a multi-threaded application. ConcurrentHashMap might help.</p>
<p>- Anon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Ankerl</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5349</link>
		<dc:creator>Martin Ankerl</dc:creator>
		<pubDate>Thu, 25 Dec 2008 10:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5349</guid>
		<description>thanks for the link, Jim!</description>
		<content:encoded><![CDATA[<p>thanks for the link, Jim!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim White</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5348</link>
		<dc:creator>Jim White</dc:creator>
		<pubDate>Thu, 25 Dec 2008 05:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5348</guid>
		<description>This is already a widely known technique called memoization.

http://en.wikipedia.org/wiki/Memoization

Heh, just looked at the Java implementation link, and it is this same proxy method published five years ago.

http://www.onjava.com/pub/a/onjava/2003/08/20/memoization.html</description>
		<content:encoded><![CDATA[<p>This is already a widely known technique called memoization.</p>
<p><a href="http://en.wikipedia.org/wiki/Memoization" rel="nofollow">http://en.wikipedia.org/wiki/Memoization</a></p>
<p>Heh, just looked at the Java implementation link, and it is this same proxy method published five years ago.</p>
<p><a href="http://www.onjava.com/pub/a/onjava/2003/08/20/memoization.html" rel="nofollow">http://www.onjava.com/pub/a/onjava/2003/08/20/memoization.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fede</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5347</link>
		<dc:creator>fede</dc:creator>
		<pubDate>Wed, 24 Dec 2008 23:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5347</guid>
		<description>public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {  
             final Args input = new Args(method, args);  
             Result result = argsToOutput.get(input);
             if (result==null) {
                  result= new Result(method.invoke(code, args));
                  argsToOutput.put(input, result);  
             }  
             return result.getValue();  
         };</description>
		<content:encoded><![CDATA[<p>public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {<br />
             final Args input = new Args(method, args);<br />
             Result result = argsToOutput.get(input);<br />
             if (result==null) {<br />
                  result= new Result(method.invoke(code, args));<br />
                  argsToOutput.put(input, result);<br />
             }<br />
             return result.getValue();<br />
         };</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Ankerl</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5346</link>
		<dc:creator>Martin Ankerl</dc:creator>
		<pubDate>Wed, 24 Dec 2008 20:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5346</guid>
		<description>Hi ben, good points! I have never used referencemap before. And if it returns null it always recalculates. I could use containsKey but then I need two lookups, one for contains and one to get the element. Merry christmas!</description>
		<content:encoded><![CDATA[<p>Hi ben, good points! I have never used referencemap before. And if it returns null it always recalculates. I could use containsKey but then I need two lookups, one for contains and one to get the element. Merry christmas!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ben</title>
		<link>http://martin.ankerl.com/2008/12/22/amazing-caching-proxy-in-java/comment-page-1/#comment-5345</link>
		<dc:creator>ben</dc:creator>
		<pubDate>Wed, 24 Dec 2008 20:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://martin.ankerl.com/?p=184#comment-5345</guid>
		<description>Improvements:

1. Use a referencemap
2. What happens if there is a large running process that returns null? :P

Merry xmas</description>
		<content:encoded><![CDATA[<p>Improvements:</p>
<p>1. Use a referencemap<br />
2. What happens if there is a large running process that returns null? <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Merry xmas</p>
]]></content:encoded>
	</item>
</channel>
</rss>
