Syntax: | open_file_cache open_file_cache
|
---|---|
Default: | open_file_cache off; |
Context: | http , server , location |
Configures a cache that can store:
- open file descriptors, their sizes and modification times;
- information on existence of directories;
- file lookup errors, such as “file not found”, “no read permission”, and so on.
Caching of errors should be enabled separately by the open_file_cache_errors directive.
The directive has the following parameters:
-
max
- sets the maximum number of elements in the cache; on cache overflow the least recently used (LRU) elements are removed;
-
inactive
- defines a time after which an element is removed from the cache if it has not been accessed during this time; by default, it is 60 seconds;
-
off
- disables the cache.
Example:
open_file_cache max=1000 inactive=20s; open_file_cache_valid 30s; open_file_cache_min_uses 2; open_file_cache_errors on;
Please login to continue.