OSCache does not require JSP

Ugo, on first glance OSCache does appear to be JSP centric but it really does not require JSP. I would not have been able to use OSCache if it required JSP, because Roller weblog pages are not JSP pages - they are generated by Velocity templates.

OSCache includes a caching Servlet Filter. The CacheFilter automatically generates a cache-key based on incoming request parameters and either pulls the corresponding entry from the cache or runs the request. So, adding OSCache to your webapp can be as simple as dropping the OSCache jar in your classpath and adding a Servlet Filter entry to your web.xml.

I had to do a little more work than that because I need to cache on a per user basis and the auto-generated cache-key does not consider request.getUserPrincipal(). So, I had to write my own Servlet Filter based on CacheFilter. Also, CacheFilter is not very well documented, so I had to look at the source to figure it out.

Roller 0.9.3 is ready
Download it today. Here are the new features.
  • Blogger API Support: contributed by Shawn Dahlen (dahlen at mitre.org). See the Roller User Guide for details.
  • Database configuration via JNDI DataSources: Roller now looks up datasources in JNDI (using java:comp/env/jdbc/rollerdb).
  • Database connection pooling: if you follow the instructions in the Roller Installation Guide, Roller will use database connection pooling.
  • Results caching for weblog pages: Roller now uses OSCache for caching all weblog pages. This results in a dramatic improvement in performance.
  • Three new themes: Roller now includes three new themes, adapted from free themes found on blogskins.com.
  • Lots of bug fixes: too numerous to list.
This post was made via the Blogger API using the w:bloggar client.

Main | Next day (Jul 2, 2002) »