<?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>Our Geek Space &#187; whirlycache</title>
	<atom:link href="http://blog.moove-it.com/category/jee/whirlycache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.moove-it.com</link>
	<description>be free to express yourself...</description>
	<lastBuildDate>Fri, 23 Jul 2010 15:35:39 +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>Steps to include lightweight cache in java applications &#8211; WhirlyCache</title>
		<link>http://blog.moove-it.com/steps-to-include-lightweight-cache-in-java-applications-whirlycache/</link>
		<comments>http://blog.moove-it.com/steps-to-include-lightweight-cache-in-java-applications-whirlycache/#comments</comments>
		<pubDate>Thu, 28 May 2009 21:34:12 +0000</pubDate>
		<dc:creator>Martin Cabrera</dc:creator>
				<category><![CDATA[jee]]></category>
		<category><![CDATA[whirlycache]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java cache]]></category>
		<category><![CDATA[java enterprise]]></category>

		<guid isPermaLink="false">http://blog.moove-it.com/?p=188</guid>
		<description><![CDATA[Data caching is a very important consideration for JEE applications.
A classic problem for any application is to detect and solve the recurrent calls for optimizing the applications. Some cases can be:

database calls
business logic calls
remote method invocations

Data caching limits the number of remote invocations in distributed applications and improves performance of web applications by reducing the [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom: 0cm;">Data caching is a very important consideration for JEE applications.</p>
<p>A classic problem for any application is to detect and solve the recurrent calls for optimizing the applications. Some cases can be:</p>
<ul>
<li>database calls</li>
<li>business logic calls</li>
<li>remote method invocations</li>
</ul>
<p>Data caching limits the number of remote invocations in distributed applications and improves performance of web applications by reducing the number of calls.</p>
<p>Several solutions exist to include a framework for implementing a cache.</p>
<ul>
<li><a href="http://www.opensymphony.com/oscache/" target="_blank">OsCache</a></li>
<li><a href="http://swarmcache.sourceforge.net/" target="_blank">SwarmCache</a></li>
<li><a href="http://www.jofti.com/" target="_blank">jofti</a></li>
<li><a href="http://labs.jboss.com/jbosscache/" target="_blank">jboss cache</a></li>
<li><a href="https://whirlycache.dev.java.net/" target="_blank">WhirlyCache</a></li>
<li><a href="http://ehcache.sourceforge.net/" target="_blank">EhCache</a></li>
<li><a href="http://cache4j.sourceforge.net/" target="_blank">Cache4J</a></li>
</ul>
<p>Check out this <a href="http://www.developer.com/img/2007/09/Table.htm" target="_blank">interesting comparative table.</a></p>
<h2>WhirlyCache (<a href="https://whirlycache.dev.java.net" target="_blank">https://whirlycache.dev.java.net</a>)</h2>
<p>I use whirlycache in two projects and works really good. I recommend it to incorporate in a simple lightweight Web application<br />
Whirlycache is a fast, configurable in-memory object cache for Java. It can be used, for example, to speed up a website or an application by caching objects that would otherwise have to be created by querying a database or by another expensive procedure. From the testing that we have done, it appears to be faster than any other Java cache that we have been able to inspect.</p>
<h2 style="margin-bottom: 0cm;">Steps to include WhirlyCache</h2>
<p><strong>(Step I)</strong> Donwload whirlycache and include it in your project -&gt; <a href="https://whirlycache.dev.java.net/files/documents/1995/34601/whirlycache-1.0.1.zip" target="_blank">https://whirlycache.dev.java.net/files/documents/1995/34601/whirlycache-1.0.1.zip</a></p>
<p><strong>(Step II)</strong> Create a cache instance</p>
<pre>CacheConfiguration cc = new CacheConfiguration();

cc.setName("KBCache");

cc.setBackend("com.whirlycott.cache.impl.ConcurrentHashMapImpl");

cc.setTunerSleepTime(60);

cc.setPolicy("com.whirlycott.cache.policy.LFUMaintenancePolicy");

cc.setMaxSize(10000);

Cache c = CacheManager.getInstance().createCache(cc);</pre>
<p><strong>(Step III)</strong> Use cache instance</p>
<p style="margin-bottom: 0cm;">
<pre>c.store(key, object);
c.remove(key);
c.retrieve(key);</pre>
<p style="margin-bottom: 0cm;">Example of java class (is a jboss seam entity class) &#8211; <span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: #000000;"><span style="font-weight: normal;"><a href="http://blog.moove-it.com/wp-content/uploads/2009/05/stockcache.java">StockCache.java</a></span></span></span></span></p>
<p style="margin-bottom: 0cm;"><span style="font-family: Monospace;"><span style="font-size: x-small;"><span style="color: #000000;"><span style="font-weight: normal;"><br />
</span></span></span></span></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Steps+to+include+lightweight+cache+in+java+applications+--+WhirlyCache+http://waid3.th8.us" title="Post to Twitter"><img class="nothumb" src="http://blog.moove-it.com/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="[Post to Twitter]" border="0" /></a> <a class="tt" href="http://twitter.com/home/?status=Steps+to+include+lightweight+cache+in+java+applications+--+WhirlyCache+http://waid3.th8.us" title="Post to Twitter">Tweet This Post</a>&nbsp; </p>]]></content:encoded>
			<wfw:commentRss>http://blog.moove-it.com/steps-to-include-lightweight-cache-in-java-applications-whirlycache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
