HTTP FastCGI directives
fastcgi_cache_path directive
HTTP; declares a disk cache and metadata zone. See source for required keys_zone and optional limits.
Formal Syntax & Structure
nginx syntaxnginx
fastcgi_cache_path path [levels=levels] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size] [min_free=size] [manager_files=number] [manager_sleep=time] [manager_threshold=time] [loader_files=number] [loader_sleep=time] [loader_threshold=time] [purger=on|off] [purger_files=number] [purger_sleep=time] [purger_threshold=time];Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| path | directory | Lab-owned storage directory for cached response files. |
| keys_zone | name:size | Shared memory name and capacity for cache metadata, not response bodies. |
| levels | colon-separated integers | Optional directory fan-out: one to three levels, each one or two characters. |
| use_temp_path | on | off | Use fastcgi_temp_path when on; write temporary entries into this cache when off. |
| inactive | duration | Remove entries not accessed during this interval, even if fresh. |
| max_size | byte size | Managed disk usage target, not a hard quota. |
| min_free | byte size | Managed free-space target (1.19.1 or later). |
| manager_files | integer | Limit files processed per manager iteration. |
| manager_sleep | duration | Pause between manager iterations. |
| manager_threshold | duration | Time budget per manager iteration. |
| loader_files | integer | Limit files processed per loader iteration. |
| loader_sleep | duration | Pause between loader iterations. |
| loader_threshold | duration | Time budget per loader iteration. |
| purger | on | off | Commercial cache purger switch; verify edition. |
| purger_files | integer | Commercial purger iteration file limit. |
| purger_sleep | duration | Commercial purger iteration pause. |
| purger_threshold | duration | Commercial purger iteration time budget. |
Working Example
Example Snippetnginx
fastcgi_cache_path run/public-cache keys_zone=public_php:1m max_size=10m;