Object caching causes unexpected behavior for some web sites, or causes sites to display stale content.
To prevent the transmission of stale content or other issues caused by object caching, you can use either cache(no)
or bypass_cache(yes)
in content policy language (CPL). For a comparison of cache(no)
and bypass_cache(yes)
, see The differences between cache(no) and bypass_cache(yes).
This sample provides instructions for disabling object caching for specific URLs by adding a policy rule in the Web Access Layer.
To use CPL code for the same policy rules, add the following CPL code in the local policy file or in a VPM CPL Policy Layer:
<Proxy>
url.domain=<url> bypass_cache(yes)
In the example above, <url> is the URL you want to exclude from caching.
Additionally, here is a CPL script to bypass cache per exception basis:
;############ Bypass Cache on Exception ############ ; This script utilizes the "bypass_cache" syntax ; to effectively prevent the ProxySG appliance from ; even checking to see if the object is in cache, ; meaning any existing cached copy will not be touched ; and can still be served to other clients which run ; with bypass_cache(no) policy. <Proxy> condition=Bypass_Cache_On_Exception bypass_cache(yes) Define condition Bypass_Cache_On_Exception url.domain=test.com url.domain=www.test2.com end condition Bypass_Cache_On_Exception ; Note: Enter additional sites into the condition; ; One site per CPL line ;########## END Bypass Cache on Exception ##########