Hi, On Jan 10, 2008 10:44 AM, Felix Meschberger <[EMAIL PROTECTED]> wrote: > But for the moment, there is no concept around yet (hint hint :-) ). > Maybe something around the Resource interface along the lines of how > Excalibur [1] does it ?
I think the closer we go with the way HTTP does it, the better. For example, we could allow each representation to optionally provide an ETag, a last modified timestamp, an expiration date, and explicit cache control information. In the Sling framework we could have support for combining that caching metadata from multiple resources, so that responses that compose representations of multiple resources could still be properly cached. We should also attach caching metadata also to servlets and scripts, and combine the metadata with that from the resource(s) processed by that component so for example a change to a script will be reflected in the cache metadata. As a completely different approach, we could make at least ETags and If-None-Match processing available even to resources that don't inherently support such caching metadata. To do this we could add a global filter that buffers say the first 100kB of all responses that don't come with explicit caching metadata, and automatically calculates an ETag and sets the Content-Length for all responses that are less than 100kB in size (and that don't flush() the buffer ). Even if this wouldn't save any processing time, it would noticeably cut down the network traffic especially for things line generated RSS or Atom feeds. BR, Jukka Zitting
