[Opensymphony-oscache] Using OSCache as a Cache plugin for Struts

kutzi <[email protected]> Mon, 11 Jul 2005 10:35:55 CDT
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <16325094.1121096189137.JavaMail.os-j2ee@opensymphony01.contegix.com>
Hi,
I'm currently trying to use OSCache as a generic cache plugin for Struts (as I don't like the idea of putting logic i.e. cacheing into JSPs). To this end I'm basically writing a custom RequestProcessor, that caches the generated HTML response. This is very much inspired by the OSCache Request Filter (which isn't sufficient in my case since I need to cache on the level of a Struts tile) and Neteyes Actioncache, which does something very similar.

The problem I've to struggle with most is the fact, that most "useful" fields in OSCache components have private access. So subclassing is not possible in most cases. Instead I have to reimplement (i.e. copy&paste) OSCache's classes and then add my custom code.
(One example: the cacheMap in Cache is private, so that I'm not even able to get the member list of a cache group, looks like I've have to completely reimplement the Cache class :( )
Is this something that will be changed in future version of OSCache? Will fields be made protected?

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=4154&messageID=10229#10229