HAOJX

nginx使用open_file_cache提升系统性能

字数统计: 95阅读时长: 1 min
2018/10/15 Share
1
2
3
4
5
Syntax:
open_file_cache off;
open_file_cache max=N [inactive=time];
Default: open_file_cache off;
Context: http, server, location

它会缓存一些元信息 , 比如:文件句柄 ,文件修改时间, 文件大小, 文件查询的错误信息, 目录是否存在

其他的指令还有:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Syntax:
open_file_cache off;
open_file_cache max=N [inactive=time];
Default: open_file_cache off;
Context: http, server, location

Syntax: open_file_cache_min_uses number;
Default: open_file_cache_min_uses 1;
Context: http, server, location


Syntax: open_file_cache_valid time;
Default: open_file_cache_valid 60s;
Context: http, server, location
CATALOG