Author Topic: Basic Integrated Cache configuration  (Read 2150 times)

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 282
  • Karma: 17
Basic Integrated Cache configuration
« on: February 14, 2008, 01:31:33 PM »
Just copy/paste the following to the CLI and you will have a basic but effective cache in a netscaler 8.
set cache parameter -memLimit 256

add cache contentgroup JS -pollEveryTime YES -removeCookies YES -maxResSize 256
add cache contentgroup CSS -pollEveryTime YES -removeCookies YES -maxResSize 256
add cache contentgroup HTML -pollEveryTime YES -removeCookies YES -maxResSize 256
add cache contentgroup PDF -pollEveryTime YES -removeCookies YES -maxResSize 4096
add cache contentgroup IMAGE -pollEveryTime NO -removeCookies YES -maxResSize 256
add cache contentgroup MS_DOC -weakPosRelExpiry 10 -weakNegRelExpiry 10 -pollEveryTime YES -removeCookies YES -maxResSize 512
add cache contentgroup MS_XLS -weakPosRelExpiry 10 -weakNegRelExpiry 10 -pollEveryTime YES -removeCookies YES -maxResSize 512
add cache contentgroup MS_PPT -weakPosRelExpiry 10 -weakNegRelExpiry 10 -pollEveryTime YES -removeCookies YES -maxResSize 512
add cache contentgroup MP3 -weakPosRelExpiry 10 -weakNegRelExpiry 10 -pollEveryTime YES -removeCookies YES -maxResSize 512
add cache contentgroup FLASH -weakPosRelExpiry 10 -weakNegRelExpiry 10 -pollEveryTime YES -removeCookies YES -maxResSize 512
set cache contentgroup DEFAULT -weakPosRelExpiry 3600 -heurExpiryParam 10 -weakNegRelExpiry 600 -pollEveryTime YES -ignoreReloadReq YES -removeCookies YES -prefetch YES -insertVia YES -insertAge YES -insertETag YES -quickAbortSize 4194303 -maxResSize 200 -memLimit 4095

add cache policy Cache_JS -rule "(REQ.HTTP.URL == /*.js || REQ.HTTP.URL == /*.jsp)" -action CACHE -storeInGroup JS
add cache policy Cache_CSS -rule "REQ.HTTP.URL == /*.css" -action CACHE -storeInGroup CSS
add cache policy Cache_images -rule "(REQ.HTTP.URL == /*.jpg || REQ.HTTP.URL == /*.jpeg) || (REQ.HTTP.URL == /*.bmp || REQ.HTTP.URL == /*.gif)" -action CACHE -storeInGroup IMAGE
add cache policy Cache_PDF -rule "REQ.HTTP.URL == /*.pdf" -action CACHE -storeInGroup PDF
add cache policy Cache_DOC -rule "REQ.HTTP.URL == /*.doc" -action CACHE -storeInGroup MS_DOC
add cache policy Cache_XLS -rule "REQ.HTTP.URL == /*.xls" -action CACHE -storeInGroup MS_XLS
add cache policy Cache_PPT -rule "REQ.HTTP.URL == /*.ppt" -action CACHE -storeInGroup MS_PPT
add cache policy Cache_MP3 -rule "REQ.HTTP.URL == /*.mp3" -action CACHE -storeInGroup MP3
add cache policy Cache_SWF -rule "REQ.HTTP.URL == /*.swf" -action CACHE -storeInGroup FLASH
add cache policy RES_NOCache_NTLM -rule "RES.HTTP.HEADER WWW-Authenticate EXISTS" -action NOCACHE


bind cache global Cache_CSS -priority 20 -precedeDefRules YES
bind cache global Cache_images -priority 30 -precedeDefRules YES
bind cache global Cache_PDF -priority 40 -precedeDefRules YES
bind cache global Cache_DOC -priority 50 -precedeDefRules YES
bind cache global Cache_XLS -priority 60 -precedeDefRules YES
bind cache global Cache_PPT -priority 70 -precedeDefRules YES
bind cache global Cache_MP3 -priority 80 -precedeDefRules YES
bind cache global Cache_SWF -priority 90 -precedeDefRules YES

bind cache global RES_NOCache_NTLM -priority 200 -precedeDefRules YES

This was handed to me by some one from Citrix Consulting. So please have in mind that this was probabily created by Tim K.

Offline distorsion

  • Contributor
  • *
  • Posts: 1
  • Karma: 0
Re: Basic Integrated Cache configuration
« Reply #1 on: January 01, 2010, 02:43:42 PM »
thanks