Welcome! Log In Create A New Profile

Advanced

Re: Two cache files with same key

Roger Fischer
January 17, 2019 06:22PM
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@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@nginx.org on behalf of roger@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@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Two cache files with same key

Roger Fischer January 17, 2019 02:40PM

Re: Two cache files with same key

Lucas Rolff January 17, 2019 03:14PM

Re: Two cache files with same key

Roger Fischer January 17, 2019 06:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready