CACHE::disable¶
Description¶
Disables the caching for this request.
Examples¶
when HTTP_REQUEST {
# Disable caching if the URI does not contain the string "images"
if { not ([HTTP::uri] contains "images") } {
CACHE::disable
}
}
# Disable caching if the query string contains specific parameter names
when HTTP_REQUEST {
# Check the query string
# Prepend a & so that we can look for param names using ¶m_name=
switch -glob "&[HTTP::query]" {
"*¶m1=*" -
"*¶m2=*" -
"*¶m3=*" -
"*¶m4=*" {
# Found one of the parameters so disable caching for this request/response
CACHE::disable
}
}
}