<?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>blog &#187; ehcache</title>
	<atom:link href="http://blog.pariyani.com/archives/tag/ehcache/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.pariyani.com</link>
	<description>Pariyani&#039;s Blog</description>
	<lastBuildDate>Tue, 01 Nov 2016 09:39:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Improving performance of a jsf App using page caching</title>
		<link>http://blog.pariyani.com/archives/24</link>
		<comments>http://blog.pariyani.com/archives/24#comments</comments>
		<pubDate>Mon, 17 May 2010 11:20:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ehcache]]></category>
		<category><![CDATA[exclude post request]]></category>
		<category><![CDATA[fragment caching]]></category>
		<category><![CDATA[jsf performance improvemnt]]></category>
		<category><![CDATA[page caching]]></category>
		<category><![CDATA[post request]]></category>

		<guid isPermaLink="false">http://blog.pariyani.com/?p=24</guid>
		<description><![CDATA[Improving performance of your jsf Application by caching your pages or some fragments using ehcache. ]]></description>
			<content:encoded><![CDATA[<p>If you are using hibernate or ejb, am sure you cache your entities using either ehcahce or JTreeCache or some other cache available. But to boost the performance you could also cache your pages or some fragments like some includes.</p>
<p>For my application i have used ehcache .. and for that everything is explained in detail <a href="http://ehcache.org/documentation/web_caching.html">here</a> </p>
<p>The only problem i encountered was that it also cached my post request .. in order to exclude all my post request from being cached i overrode the methode caclulatekey to return null for post requests .. Am sure there is some configuration variable which one could set in the web.xml or ehcache.xml but i was to lazy to search <img src='http://blog.pariyani.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  .. </p>
<pre class="brush: java;">
protected String calculateKey(HttpServletRequest httpRequest) {
        if (httpRequest.getMethod().equals(&quot;POST&quot;))
            return null; ...
</pre>
<p>You could then use some custom tag for caching some parts of your page. for e.g seam has a tag <s:cache>  you could also have a tag similar to that and cache your page fragments. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pariyani.com/archives/24/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
