Nginx cache 1 KEY into multiple cache files (cache not running)

Maxim Dounin mdounin at mdounin.ru
Thu Nov 19 15:59:34 UTC 2015


Hello!

On Thu, Nov 19, 2015 at 12:12:18PM -0200, Guilherme wrote:

> In these cases, when Vary is present in response headers and generate
> multiple cache files for the same key, how nginx determines  cache file
> names for variants?

Secondary keys are calculated as an MD5 hash of the main key and 
headers of a request listed in Vary.  Details can be found in the 
source code, see the ngx_http_file_cache_vary() function:

http://hg.nginx.org/nginx/file/tip/src/http/ngx_http_file_cache.c#l1043

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list