Two cache files with same key

Roger Fischer roger at
Thu Jan 17 23:21:29 UTC 2019


the key config is:

        # cache key is last part of URI
        set $cachekey '$uri';
        if ($uri ~ '([^/]+$)') { set $cachekey $1; }
        proxy_cache_key "$cachekey";

The URI includes query parameters:


The key from the cache files are:

c/2c/ce5e89ff8bbc50ae58040855232242cc KEY: 18f1e750-d25d-4ad1-a518-1adad04a9740_corrected.mpd
d/59/a44f4cc7a098be369daac12f1aac759d KEY: 18f1e750-d25d-4ad1-a518-1adad04a9740_corrected.mpd


> On Jan 17, 2019, at 12:12 PM, Lucas Rolff <lucas at> wrote:
> What key do you see and what's your cache key configured as?
> On 17/01/2019, 20.39, "nginx on behalf of Roger Fischer" <nginx-bounces at on behalf of roger at> wrote:
>    Hello,
>    I am using the nginx cache. I observed a MISS when I expected a HIT. When I look at the cache, I see the same page (file) twice in the cache, the original that I expected to HIT on, and the new one from the MISS (that should have been a HIT).
>    The key, as viewed in the cache file, is exactly the same.
>    What else, besides the key is considered in determining a hit or miss?
>    Thanks…
>    Roger
>    _______________________________________________
>    nginx mailing list
>    nginx at
> _______________________________________________
> nginx mailing list
> nginx at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list