Quoting Thomas Eibner (thomas at stderr.net):
> Why would you want your servlet container to cache the queries for you?
> That is the job of the database, and the database only. What if the data
> changed on disk?

Uh, I asked you not to ask me how it does it. :-)

To be honest, I can't answer your question. But using Enhydra3 with DODS
(http://www.enhydra.org) it does some aggressive cache stuff and really gives a
performance boast.

You of course can .hitDatabase() and force it do it the DB everytime, you can
even for all queries to hit the database via a properties file.

How do I use this?

Let's say you have a lookup table for the US states, both the abbreviations and
full names (MN, Minnesota). First hit to the db populates the cache, every
request after that gets it from the cache, without having to query the db. I do
the the same thing for Countries.

I have yet to run into a problem with the cache not working, but I've been to
busy writing apps to really understand how it works, so I just file it under the
blackbox fold and use it.

Snarf DODS and take a look, the code is actually well written and documented.

-- 
Minneapolis St. Paul Twin Cities MN        | Phone : (952)943-8700
http://www.mn-linux.org Minnesota Linux    | Fax   : (952)943-8500
Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9