Forum Discussion

Clayton_Wagner_'s avatar
Clayton_Wagner_
Icon for Nimbostratus rankNimbostratus
Feb 06, 2013

Modify Cache-Control Header

Here is the rule I have so far. But I need it to be something like "max-age > 0"

 

when HTTP_RESPONSE {

 

 

if { [HTTP::header value "Cache-Control"] contains "max-age" } {

 

set cache_control "public,max-age=900"

 

HTTP::header replace "Cache-Control" $cache_control

 

}

 

}

 

 

Any ideas?

 

 

TY

 

 

 

1 Reply

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    Wouldn't the type be "private" rather than the "max-age" being 0?

     

    If not, you can check for the existence of "max-age=0".

     

    Otherwise, "string" is your friend (http://www.tcl.tk/man/tcl8.4/TclCmd/string.htm).