Dave Johnson on open web technologies, social software and software development
« | Main | Openness of Microsof... »
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.
Dave Johnson in Java
02:45PM Jul 01, 2002
Comments [0]
Tags:
Java
« | Main | Openness of Microsof... »
This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog
Below are the most recent entries in the category Java, some may be related to this entry.