Monday, October 18, 2010

Stubborn Publisher Cache

So you have been working on BEA Publisher and you face that issue, which I think everyone faces with Publisher……the dreaded Caching of content. It is evil my friends. Evil because, Publisher has the habit of caching content and displaying this content. While this is good on some occasions because it helps in faster page load, however, when you are working on some portlet and want to immediately see the effects of your change, this same boon becomes your bane.
Recently I was working on this and found out some tips which can provide relief from the caching content of Publisher.

This is a 2 step process:

Step1: The easiest way is turn off caching in the Publisher WebService.



In the HTTP Configuration page of your Publisher Web Service, look for the Gateway Caching section present at the top of the page. Make both the Minimum Cache Time and Maximum Cache Time as ZERO seconds. Don’t forget to un-check the check box for Suppress errors where possible, so that it is blank.
Click on Finish and your Publisher portlets will no longer show cached content. However do take note, that you should keep a record of you Min and Max Cache Times and restore them once your work is completed, otherwise you are gonna hear a lot of complaining that portlets are taking a long long time to load in the page.


Step 2:
While the Step 1 above works every time, there is one other thing which you can do to make absolutely certain that no cached content remains anywhere. This step needs access to the server on which BEA Publisher 6.5 is installed.
The steps to perform are as follows:
~ Log into the server where BEA Publisher is installed
~ Stop the Publisher service running on that system
~ Search for the folder named localhost in the ptcs installation directory. Normally it will be found like D://BEA/alui/ptcs/6.5/container/work/jboss.web
~ Delete the whole local host folder
~ Restart the Publisher web service once again (The localhost folder will be re-created once again)