Chapter 1 What’s New for FortiOS 5.0 : WAN optimization and Web Caching : Changing the ports on which to look for HTTP and HTTPS traffic to cache
  
Changing the ports on which to look for HTTP and HTTPS traffic to cache
By default, FortiOS assumes HTTP traffic uses TCP port 80 and HTTPS traffic uses port 443 and so web caching is configured for all HTTP traffic accepted by a policy on TCP port 80 and all HTTPS traffic on TCP port 443. If you want to cache HTTP or HTTPS traffic on other ports, you can enable Security features for the security policy and add an SSL/SSH inspection profile that looks for HTTP and HTTPS traffic on other TCP ports.
Setting the HTTP port to Any in the an SSL/SSH inspection profile is not compatible with web caching. If you set the HTTP port to any, web caching only caches HTTP traffic on port 80.