Two cache files with same key

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


Hello,

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:

/dm/2$q7zVD5pG1k6QpMe6Nz7a8uZDx78~/de4c/5433/a0db/4f70-b9f7-413f3f47f38d/18f1e750-d25d-4ad1-a518-1adad04a9740_corrected.mpd?encoding=hex

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

Roger


> On Jan 17, 2019, at 12:12 PM, Lucas Rolff <lucas at lucasrolff.com> 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 nginx.org on behalf of roger at netskrt.io> 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.org
>    http://mailman.nginx.org/mailman/listinfo/nginx
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20190117/fd7e307c/attachment.html>


More information about the nginx mailing list