I should have explained some more I guess. I am currently using OSCACHE at the UI layer to cached search results strings per page ID in application scope. It is very effective indeed. The search results come from a content management system. When users interact with the CMS, events are fired to a listener and I can determine which page in the cache needs updating.
However I realised this morning that search results per row are security contolled. Therefore user A's search results for page 5 are not necessarily the same as user B's. Hence the need for user-level caching. I used my own caching Hashes before but OSCACHE is very powerful. OSCACHE's cache JSP tag also provides only application and session scope, therefore I was thinking session caching must be the only other solution for my problem. But I need to be able to programmatically flush many user sessions. Perhaps I need to store the caches created per session somewhere so I can grab them. Allistair Crossley > -----Original Message----- > From: Michiel Toneman [mailto:[EMAIL PROTECTED] > Sent: 19 August 2004 09:57 > To: Tomcat Users List > Subject: Re: [OFFTOPIC] Removing attribute from all HttpSessions > > > Bad caching strategy. > > Try using a singleton cache backed by a HashMap. Have an invalidation > method that takes a pagekey as argument. Create a simple get(pagekey) > that checks for invalidation and refills the cache entry when > necessary. > > No need to go iterating over sessions... > > Just my $0.02 :-) > > Michiel > > Allistair Crossley wrote: > > >Hey, > > > >I am putting a page caching stategy into place per user > session. However, there are times when I need to refresh all > the caches for all users. For example, let's say 5 users have > a cached version of page 5. An external event causes page 5 > to invalidate. I need an effective strategy to flush all > sessions with page 5 cached. > > > >Thoughts appreciated, Allistair. > > > > > ><FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> > >------------------------------------------------------- > >QAS Ltd. > >Developers of QuickAddress Software > ><a href="http://www.qas.com">www.qas.com</a> > >Registered in England: No 2582055 > >Registered in Australia: No 082 851 474 > >------------------------------------------------------- > ></FONT> > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > Michiel Toneman Software Engineer Bibit Global Payment Services > Regulierenring 10 3981 LB Bunnik [EMAIL PROTECTED] > Tel. +31-30-6595168 Fax +31-30-6564464 http://www.bibit.com/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> ------------------------------------------------------- QAS Ltd. Developers of QuickAddress Software <a href="http://www.qas.com">www.qas.com</a> Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- </FONT> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]