April 2005

« June 2005 | Main

More on portlet caching

Wednesday, April 13, 2005

Revisiting a Dev2Dev article on portlet caching and the render cacheable attribute.

A few months back I wrote an article for Dev2Dev explaining how portlet caching works in Portal 8.1. This feature had not been previously well documented and there were some potential pitfalls with this feature if you did not understand how it worked and what it did.

Another reason for writing the article was that the way portlet caching worked often went against developer expectations, for example pressing the browser refresh button does not cause the cache to be used, instead the portlet is re-rendered. As explained in the article, the reason for this is that the cache is tied into a particular phase of the portlet lifecycle and if that phase isn't hit during the rendering cycle then the cache doesn't get used. Explaining the ins and outs of this was a key component of the article.

After I wrote the article I got a few e-mails from readers complaining that the caching behavior explained in the article was not what they were observing. In particular, pressing the browser refresh button did cause the cache to be used contrary to what the article stated. After further investigation, we found that the behavior of the cache had changed between SP3, when the article was written, and SP4 which was released shortly before the article was published.

I tend to prefer this new behavior as I think it is more in line what developers would expect a cache to do. Having said that, I am currently following up on this and hopefully will have some additional clarification in the next few weeks. For now, just be aware that the cache behavior has changed somewhat under SP4 and plan accordingly.

Posted by Gerald Nunn at 4:02 PM | Categories: WebLogic | | | Permalink