Fortinet white logo
Fortinet white logo

Administration Guide

What can be cached?

What can be cached?

Caching generally works best with data that doesn't change. Things like static web pages, images, movies, and music all typically work well.

When content changes often, caching provides overhead by consuming RAM without its usual benefit of reduced latency. Some HTTP headers and other factors indicate dynamic content which FortiWeb will not cache.

FortiWeb will not cache responses if the request:

  • Method is not GET (e.g. responses to POST are not cached)
  • Has fields such as Cache-Control: max-age=0/no-cache/no-store/; Pragma:no-cache
  • Contains URL with query string
  • Contains body
  • Contains the header:
    • Authorization
    • Proxy-Authorization
    • If-Modified-Since
    • If-Unmodified-Since
    • If-Match
    • If-None-Match

FortiWeb will not cache if the response:

  • Whose status code is not 200
  • Has a Vary: field
  • Forbids caching (e.g. Cache-Control: no-cache/no-store/private)
  • Has no Content-Length: field (e.g. Connection:close and Transfer-Encoding: chunked)
  • Has no cache expiry tag (e.g. Last-Modified/Etag and Cache-Control/Expires)
  • Contains the header:
    • WWW-Authenticate
    • Proxy-Authenticate
    • Set-Cookie
    • Set-Cookie2

What can be cached?

What can be cached?

Caching generally works best with data that doesn't change. Things like static web pages, images, movies, and music all typically work well.

When content changes often, caching provides overhead by consuming RAM without its usual benefit of reduced latency. Some HTTP headers and other factors indicate dynamic content which FortiWeb will not cache.

FortiWeb will not cache responses if the request:

  • Method is not GET (e.g. responses to POST are not cached)
  • Has fields such as Cache-Control: max-age=0/no-cache/no-store/; Pragma:no-cache
  • Contains URL with query string
  • Contains body
  • Contains the header:
    • Authorization
    • Proxy-Authorization
    • If-Modified-Since
    • If-Unmodified-Since
    • If-Match
    • If-None-Match

FortiWeb will not cache if the response:

  • Whose status code is not 200
  • Has a Vary: field
  • Forbids caching (e.g. Cache-Control: no-cache/no-store/private)
  • Has no Content-Length: field (e.g. Connection:close and Transfer-Encoding: chunked)
  • Has no cache expiry tag (e.g. Last-Modified/Etag and Cache-Control/Expires)
  • Contains the header:
    • WWW-Authenticate
    • Proxy-Authenticate
    • Set-Cookie
    • Set-Cookie2