tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michiel Toneman <>
Subject Re: [OFFTOPIC] Removing attribute from all HttpSessions
Date Thu, 19 Aug 2004 08:56:48 GMT
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 :-)


Allistair Crossley wrote:

>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.
>QAS Ltd.
>Developers of QuickAddress Software
><a href=""></a>
>Registered in England: No 2582055
>Registered in Australia: No 082 851 474
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Michiel Toneman  Software Engineer   Bibit Global Payment Services
Regulierenring 10  3981 LB  Bunnik
Tel. +31-30-6595168  Fax +31-30-6564464

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message