OSCache can really upgrade your performance. Here's a short HOWTO:

Install OSCache#

If you are running an older version of JSPWiki, you can skip this phase. OSCache comes with the distribution.

Drop the oscache.jar into your WEB-INF/lib directory.

Install the tag libraries and properties#

If you are running an older version of JSPWiki, you can skip this phase. OSCache comes with the distribution.

Drop the oscache.tld and oscache.properties into your WEB_INF/classes directory.

Add the oscache.tld to your template#

Put the following in your PageContent.jsp file (if you're using the default template):

<%@ taglib uri="/WEB-INF/classes/oscache.tld" prefix="oscache" %>

Make JSPWiki use OSCache#

Wrap the InsertPageTag with the oscache:cache tags like this:

<oscache:cache time="60">
      <div class="pagecontent">
      <wiki:InsertPage />
      </div>
</oscache:cache>

This saves the rendered HTML in memory for 60 seconds. You can use a longer period, if you wish. You can also wrap bigger sections of the page, if you want.

Make JSPWiki flush the OSCache when you edit the pages#

Put the following in your EditTemplate.jsp, somewhere.

<%@ taglib uri="/WEB-INF/classes/oscache.tld" prefix="oscache" %>

<oscache:flush />

That's it!#

Restart JSPWiki and watch those pages fly!

Caveat#

Some plugins (such as the CurrentTimePlugin) will be showing the wrong time, since OSCache will be serving cached versions of the generated HTML.


Using IS Cache

--Jayesh, 01-Mar-2007


sorry for wrong comments

I am using excel plugin to view excel sheet as HTML content. When using OS cache evenif I update sheet data is not updated. I understand that it is because cached content is displayed but there has to be some way to flush OS cache from wiki page so that things can be updated at least on next run. Or a refresh button when OS cache is ON.

--Jayesh, 01-Mar-2007

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-8) was last changed on 01-Mar-2007 16:36 by Jayesh