CACHE::disable

Description

Disables the caching for this request.

Syntax

CACHE::disable

CACHE::disable

  • 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 &param_name=
   switch -glob "&[HTTP::query]" {
      "*&param1=*" -
      "*&param2=*" -
      "*&param3=*" -
      "*&param4=*" {
         # Found one of the parameters so disable caching for this request/response
         CACHE::disable
      }
   }
}