CACHE::useragent

Description

Overrides the useragent value used by the cache to reference the cached content.
Cached content by default is stored with a unique key referring to both the resource to be cached and the User-Agent for which is was formatted. If the content is formatted the same for multiple User-Agents, you can use this command to group various user agent values into a single group, thus minimizing duplicated cached content.

Syntax

CACHE::useragent <string>

CACHE::useragent <string>

  • Overrides the useragent value used by the cache to store the cached content.

Examples

This will put all MSIE based browsers into a single cache group.
when HTTP_REQUEST {
  if {[HTTP::header User-Agent] contains “MSIE”} {
    CACHE::useragent “MSIE”
  }
}

This will ignore all client user agents and put all clients into the same cache group.
when HTTP_REQUEST {
  CACHE::useragent "GENERIC-UA"
}