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;#表示200的12h过期
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;

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

查看所有标签

猜你喜欢:

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

Operating System Algorithms

Operating System Algorithms

Nathan Adams、Elisha Chirchir / CreateSpace Independent Publishing Platform / 2017-4-21 / USD 39.15

Operating System Algorithms will walk you through in depth examples of algorithms that you would find in an operating system. Selected algorithms include process and disk scheduling.一起来看看 《Operating System Algorithms》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试