Use of suffix in generating key when using CacheFilter
"Chico Charlesworth" <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.os-cache |
|---|---|
| Message-ID | <[email protected]> |
Hi guys, I've got a small issue with the CacheFilter class. I'm trying to extend the CacheFilter whereby i can do some pre-caching operations. What i want to do is apply a network filter before calling the cache filter, which will tell me which customer base i'm dealing with (via ip address matching), and then add a suffix to the cache key generated, therefore caching different results per customer base. In ServletCacheAdministrator there is a possibility to pass a suffix parameter when generating a key, so it would be nice if possible that the CacheFilter had a mechanism in place to pass in a suffix (e.g. have a method doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain, String suffix)). Any possibility this could be done? chico. -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of Chris Miller Sent: 02 December 2003 09:52 To: [email protected] Subject: [Opensymphony-oscache] Re: About OSCache Encoding. There's a nasty looking line of code in the CacheHttpServletResponseWrapper.getWriter() method: cachedWriter = new PrintWriter(getOutputStream()); This causes the PrintWriter to use the default character encoding, which I suspect is at least part of the problem... I won't get time to tackle this for at least a week, so if someone else wants to have a go at it in the meantime please feel free :-) Patrick Lightbody wrote: > I believe Jun is using the Filter cache. > > Jun, what is the encoding you expect and what is the encoding you are > getting? Also, can you give more detail about the different parts (what > the JSPs and VMs look like, what cache setup you have)? > > -Pat > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of > jun cai > Sent: Wednesday, November 26, 2003 6:23 PM > To: os cache > Subject: [Opensymphony-oscache] About OSCache Encoding. > > My problem is that the page encoding is wrong when > I use OSCache and velocity in my web application ,but > when I use OSCache and jsp in my web application in my > web application ,all works well. > > thanks. ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Opensymphony-oscache mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensymphony-oscache ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/