>>> Danny Rubis <[EMAIL PROTECTED]> 17-Aug-00 2:30:11 AM >>>
>[EMAIL PROTECTED]
>Is doing a caching Session. Contact him if you
>want to help out with the design. Beware, you
>better be an advanced servlet developer though.
>He'll chew you up and spit you out, otherwise. 8>)
Oh dear.... my reputation preceeds me.
I'm affraid Danny is wrong on both accounts:
1. I won't chew you up and spit you out
Unless
i) you post dumb questions to public lists
ii) I can get hold of you /8->
2. I'm no longer developing a caching system for servlets
We just haven't updated the web page yet! (sorry)
Here's the reason we're not doing this anymore:
A caching system (as envisaged by TF) doesn't add anything to the
servlet environment. Caching needs to be under the control of the
application and therefore cannot work in a generic manner. The caching
system envisaged by us was designed to speed responses from the server
but didn't actually work (because of various technical reasons) and it
also prevented servlets from controlling their own caching.
What Peter wants to do *should* be done by the servlets that the
requests are going to.
Here's how:
1. Servlet overrides getLastModified method to return the last time
the content was updated
To do this the servlet obviously needs to be able to work out when it
will regenerate content and when it won't.
2. if the getLM returns a time beyond that in the browser's cache the
servlet's service method is called
You can see that the process needs to be controlled by the servlet
because only the servlet knows what last modified date of the content
is.
Doing things this way also makes tremendous sense because you're
using the browser's cache and therefore transferring much less data
over the network.
Also you *could* write a chaining system to do this. As long as the
front end servlet knows when the content will change it can control
things. The front end servlet's service method would just forward to
the next servlet in the chain (using an RD presumably).
Nic Ferrier
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html