| Syntax: | fastcgi_cache_key string |
| Default: | |
| Context: | http server location |
| Reference: | fastcgi_cache_key |
The directive sets the key for caching, for example:
fastcgi_cache_key "$scheme$request_method$host$request_uri";
Be advised that a HEAD request can cause an empty response to be cached & later be distributed to GET requests, avoid this by having $request_method in the cache key. Including the $scheme for the same reason may be beneficial to avoid serving up pages with insecure content to HTTPS visitors (or vice-versa).