Fortinet white logo
Fortinet white logo

Administration Guide

Troubleshoot for caching issues

Troubleshoot for caching issues

There are several methods for troubleshooting if a URL is not cached as expected:

  1. Check web cache configuration;

    Examine if the specific headers of the request match the cache rule: Host, Path/URL, HTTP Method, Return Code, File Type and Key Generation Factors.

  2. On 7.0.2 & later builds, click the button Test to check if a URL can hit the web cache:
  3. On 7.0.2 & later builds, when cached content is hit, there will be statistics in Dashboard > Status > Throughput:
  4. On 6.3.x & later builds, you can also check if the Requests (Cache Hit/Total) count increase.

    However, this count usually has time delay (max 15 minutes) after the cache is hit.

  5. Check if the response is replied by FortiWeb or the back-end server.
    On 7.0.0 & later builds, you can also check if the Requests (Cache Hit/Total) count increase.

    On 6.3, you need to capture packets on FortiWeb and check if the new request is sent to the back-end server. If a request is not sent to the back-end server while the client can receive the replay, cache content should be hit.
  6. You can also enable diagnose logs to check more processing details or collect information for further analysis.

    FWB # diagnose debug application web-cache 5

    FWB # diagnose debug enable

    Example for a successful cache hit:

    [web cache][DBG_H](./waf_module/web_cache.c:3973): web_cache_process: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3141): process_web_cache_s2c_hash_table: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3145): process_web_cache_s2c_hash_table: WEB_CACHE_CACHE_HT_HIT in response

    [web cache][INFO](./waf_module/web_cache.c:3148): process_web_cache_s2c_hash_table: The WEB content is from WEB Cache!

    [web cache][DBG_H](./waf_module/web_cache.c:281): req_match_single_rule: match web cache rule success : /

    Example for cache hit failure:

    [web cache][DBG_H](./waf_module/web_cache.c:3973): web_cache_process: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3141): process_web_cache_s2c_hash_table: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3168): process_web_cache_s2c_hash_table: WEB_CACHE_HT_PREPARE_CACHE in response

    [web cache][INFO](./waf_module/web_cache.c:3170): process_web_cache_s2c_hash_table: The WEB content is from Physical server!

    [web cache][DBG_H](./waf_module/web_cache.c:281): req_match_single_rule: match web cache rule success : /

Troubleshoot for caching issues

Troubleshoot for caching issues

There are several methods for troubleshooting if a URL is not cached as expected:

  1. Check web cache configuration;

    Examine if the specific headers of the request match the cache rule: Host, Path/URL, HTTP Method, Return Code, File Type and Key Generation Factors.

  2. On 7.0.2 & later builds, click the button Test to check if a URL can hit the web cache:
  3. On 7.0.2 & later builds, when cached content is hit, there will be statistics in Dashboard > Status > Throughput:
  4. On 6.3.x & later builds, you can also check if the Requests (Cache Hit/Total) count increase.

    However, this count usually has time delay (max 15 minutes) after the cache is hit.

  5. Check if the response is replied by FortiWeb or the back-end server.
    On 7.0.0 & later builds, you can also check if the Requests (Cache Hit/Total) count increase.

    On 6.3, you need to capture packets on FortiWeb and check if the new request is sent to the back-end server. If a request is not sent to the back-end server while the client can receive the replay, cache content should be hit.
  6. You can also enable diagnose logs to check more processing details or collect information for further analysis.

    FWB # diagnose debug application web-cache 5

    FWB # diagnose debug enable

    Example for a successful cache hit:

    [web cache][DBG_H](./waf_module/web_cache.c:3973): web_cache_process: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3141): process_web_cache_s2c_hash_table: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3145): process_web_cache_s2c_hash_table: WEB_CACHE_CACHE_HT_HIT in response

    [web cache][INFO](./waf_module/web_cache.c:3148): process_web_cache_s2c_hash_table: The WEB content is from WEB Cache!

    [web cache][DBG_H](./waf_module/web_cache.c:281): req_match_single_rule: match web cache rule success : /

    Example for cache hit failure:

    [web cache][DBG_H](./waf_module/web_cache.c:3973): web_cache_process: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3141): process_web_cache_s2c_hash_table: begin

    [web cache][DBG_H](./waf_module/web_cache.c:3168): process_web_cache_s2c_hash_table: WEB_CACHE_HT_PREPARE_CACHE in response

    [web cache][INFO](./waf_module/web_cache.c:3170): process_web_cache_s2c_hash_table: The WEB content is from Physical server!

    [web cache][DBG_H](./waf_module/web_cache.c:281): req_match_single_rule: match web cache rule success : /