[ 
http://issues.apache.org/jira/browse/JS2-303?page=comments#action_12318932 ] 

Scott T Weaver commented on JS2-303:
------------------------------------

Here is how I will be implementing the cache controls for item generated by the 
content server:

Last-Modified and Cache-Control

The ContentLocator now has a method to retrieve the last modified date of the 
File we are serving.  We use that to populate the Last-Modified header.

As for Cache-Control settings, this what I'm using:
max-age=3600 which puts the longest cache time at one hour.
must-revalidate forces browsers to reload if last modified has changed or 
max-age is exceeded proxy-revalidate same as must-revalidate but is targeted at 
proxy servers specifically.

I have also added a Apache-Jetspeed-Info header that will contain the actual 
path, starting at the webroot, of the file that was servered. 


> ContentServer doesn't allow for content caching
> -----------------------------------------------
>
>          Key: JS2-303
>          URL: http://issues.apache.org/jira/browse/JS2-303
>      Project: Jetspeed 2
>         Type: Improvement
>   Components: ContentServer
>     Versions: 2.0-M3
>  Environment: Linux, Sun JDK-1.5.0, Tomcat 5.0.30
>     Reporter: Aleksander Adamowski

>
> The files comprising Velocity templates (especially images) are prevented 
> from being cached in proxies and end user browsers, which creates significant 
> bandwidth/resources waste.
> This is because the ContentServer doesn't provide any cache control headers 
> (Expires, Last-Modified, Cache-Control) and doesn't react to client's cache 
> related headers (If-Modified-Since). 
> When serving ordinary files from Velocity template directories, ContentServer 
> has access to necessary data - notably file modification timestamps, so it 
> could generate proper cache control headers.
> An example site with its performance suffering because of this: 
> http://kwiaty.altkom.pl:8880/jetspeed/ (notice that the images load with each 
> page view, again and again, instead of being cached on client side).
> There's an excellent tutorial on HTTP caching techniques here: 
> http://www.mnot.net/cache_docs/

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to