Nginx服务系列——缓存

栏目: 服务器 · Nginx · 发布时间: 6年前

内容简介:proxy_cache_path path[levels=1:2] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size]......(http)proxy_cache zone | off;(默认off)(httpserverlcation)proxy_cache_valid [code ...] time;(httpserverlocation)缓存周期配置

proxy_cache_path path[levels=1:2] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size]......(http)

proxy_cache_path /opt/app/cache levels=1:2 keys_zone=jim_cache:10m max_size=10g(目录最大存储大小) inactive=60m(一小时内没有访问过缓存文件就被清理) use_temp_path=off;

proxy_cache zone | off;(默认off)(httpserverlcation)

proxy_cache_valid [code ...] time;(httpserverlocation)缓存周期配置

proxy_cache_valid 200 12h;#表示20012h过期
proxy_cache_valid any 10m;#表示其他请求都是10分钟过期

proxy_cache_key 方式表示已什么方式为key来缓存

proxy_cache_key $host$url$is_args$args;

proxy_no_cache string不用缓存的url

proxy_no_cache string;(http\server\location)

proxy_next_upstream filed filed;发生错误和超时就请求下一台服务器

proxy_next_upstream error timeout

slice分片请求

slice size(http\server\location)默认size=0;

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Programming Rust

Programming Rust

Jim Blandy / O'Reilly Media / 2016-8-25 / GBP 47.99

This practical book introduces systems programmers to Rust, the new and cutting-edge language that’s still in the experimental/lab stage. You’ll learn how Rust offers the rare and valuable combination......一起来看看 《Programming Rust》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具