Tuesday, August 14, 2012

Configuring cache controls for static files in Sun Java System Web Server 7

Edit the obj.conf as mentioned below:
Add these below lines after AuthTrans and NameTrans
directive to set up 10 days of cache from current access time
if path="~"
ObjectType fn="set-variable" insert-srvhdrs="Expires:$(httpdate($time + 864000))"
ObjectType fn="set-cache-control" control="public,private,must-revalidate,max-age=$(httpdate($time + 864000))"
/if


No comments:

Post a Comment