fastcgi_cache_purge

Syntax: fastcgi_cache_purge string ...; Default: — Context: http, server, location This directive appeared in version 1.5.7. Defines conditions under which the request will be considered a cache purge request. If at least one value of the string parameters is not empty and is not equal to “0” then the cache entry with a corresponding cache key is removed. The result of successful operation is indicated by returning the 204 (No Content) response. If the cache key of a purge reque

fastcgi_cache_path

Syntax: fastcgi_cache_path path [levels=levels] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=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]; Default: — Context: http Sets the path and other parameters of a cache. Cache da

fastcgi_cache_min_uses

Syntax: fastcgi_cache_min_uses number; Default: fastcgi_cache_min_uses 1; Context: http, server, location Sets the number of requests after which the response will be cached.

fastcgi_cache_methods

Syntax: fastcgi_cache_methods GET | HEAD | POST ...; Default: fastcgi_cache_methods GET HEAD; Context: http, server, location This directive appeared in version 0.7.59. If the client request method is listed in this directive then the response will be cached. “GET” and “HEAD” methods are always added to the list, though it is recommended to specify them explicitly. See also the fastcgi_no_cache directive.

fastcgi_cache_max_range_offset

Syntax: fastcgi_cache_max_range_offset number; Default: — Context: http, server, location This directive appeared in version 1.11.6. Sets an offset in bytes for byte-range requests. If the range is beyond the offset, the range request will be passed to the FastCGI server and the response will not be cached.

fastcgi_cache_lock_timeout

Syntax: fastcgi_cache_lock_timeout time; Default: fastcgi_cache_lock_timeout 5s; Context: http, server, location This directive appeared in version 1.1.12. Sets a timeout for fastcgi_cache_lock. When the time expires, the request will be passed to the FastCGI server, however, the response will not be cached. Before 1.7.8, the response could be cached.

fastcgi_cache_lock_age

Syntax: fastcgi_cache_lock_age time; Default: fastcgi_cache_lock_age 5s; Context: http, server, location This directive appeared in version 1.7.8. If the last request passed to the FastCGI server for populating a new cache element has not completed for the specified time, one more request may be passed to the FastCGI server.

fastcgi_cache_lock

Syntax: fastcgi_cache_lock on | off; Default: fastcgi_cache_lock off; Context: http, server, location This directive appeared in version 1.1.12. When enabled, only one request at a time will be allowed to populate a new cache element identified according to the fastcgi_cache_key directive by passing a request to a FastCGI server. Other requests of the same cache element will either wait for a response to appear in the cache or the cache lock for this element to be released, up to

fastcgi_cache_key

Syntax: fastcgi_cache_key string; Default: — Context: http, server, location Defines a key for caching, for example fastcgi_cache_key localhost:9000$request_uri;

fastcgi_cache_bypass

Syntax: fastcgi_cache_bypass string ...; Default: — Context: http, server, location Defines conditions under which the response will not be taken from a cache. If at least one value of the string parameters is not empty and is not equal to “0” then the response will not be taken from the cache: fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; fastcgi_cache_bypass $http_pragma $http_authorization; Can be used along with the fastcgi_no_cache directive.