Nginx缓存命中分析

1、缓存命中分析方式

(1)方式一

        通过设置Response头信息Nginx-Cache

        add_header Nginx-Cache “$upstream_cache_status”

 

(2)方式二

       通过设置log_format打印日志分析

 

2、$upstream_cache_status详解

Nginx缓存命中分析

3、缓存命中配置

Nginx缓存命中分析

4、验证缓存命中配置是否生效

(1)第一次请求访问,Nginx-Cache:MISS

Nginx缓存命中分析

(2)第二次请求访问,Nginx-Cache:HIT

Nginx缓存命中分析

(3)第三次请求访问(删除Cache文件),Nginx-Cache:MISS

Nginx缓存命中分析

Nginx缓存命中分析

 

相关文章:

  • 2021-07-09
  • 2021-12-15
  • 2022-02-12
  • 2022-12-23
  • 2022-02-02
猜你喜欢
  • 2021-12-22
  • 2021-10-29
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-09
相关资源
相似解决方案