For instance if I want to page through it ( using displaytags.org (10 out of 10)) or simply if I don't want to fetch
from the database time and time again.
By default the data expires on an hourly basis. And if a different combination of parameters is sent it expires
the cached stuff.
Nice code, but if you use iBATIS http://www.ibatis.com for your persistence layer you get all of that functionality out of the box. Takes care of all the caching for you. It'll even always flush the cache whenever an update or insert is peformed. So basically you make the same simple DAO call... ie. myDao.getMyList().. and you don't have to worry about it whether you need a fresh query or not.
Unfortunately as cool as caching is, in many(most?) situations the database is not just modified by your application, so you can't rely on the cache being flushed at appropriate times. For example say the inventory to display is updated in the database by some other process outside of your web application. When displaying the inventory you always want to make sure you have the most recent inventory so you can't rely on caching.
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]