Welcome! Log In Create A New Profile

Advanced

Re: Purge the Nginx cache

All files from this thread

File Name File Size   Posted by Date  
nginxdefault.conf 5.1 KB open | download kaushalshriyan 04/26/2022 Read message
nginxpurge.conf 5.2 KB open | download kaushalshriyan 04/28/2022 Read message
nginxdefault.conf 5.1 KB open | download kaushalshriyan 05/03/2022 Read message
nginx.conf.bypass 5.4 KB open | download kaushalshriyan 05/03/2022 Read message
Francis Daly
May 03, 2022 04:30AM
On Fri, Apr 29, 2022 at 12:54:42AM +0530, Kaushal Shriyan wrote:

Hi there,

> I am following
> https://www.ryadel.com/en/nginx-purge-proxy-cache-delete-invalidate-linux-centos-7/
> and https://bluegrid.io/edu/how-to-purge-the-nginx-cache/ to purge cache. I
> am attaching the nginx file for your reference.

It's probably best to follow exactly one document, to avoid any confusion
from mixing things.

I think that you are following the second one here with its method number
2, using the stock nginx proxy_cache_bypass directive.

> $curl -I https://gsmanginxproxycachepurge.testapicraft.com -H
> "secret-header: true"

> *X-Cache-Status: HIT*
>
> I am seeing it as HIT instead of BYPASS and I am not sure about this term
> between HIT vs MISS vs BYPASS vs EXPIRED in context to Nginx cache.

Your configuration for https://gsmanginxproxycachepurge.testapicraft.com
reads the $bypass variable if it is set; but it never sets it, so it will
be read as "empty", and the proxy_cache_bypass directive will *not*
cause the cache to be bypassed in this case.

If you want to use this method, you must ensure that your $bypass variable
is set for the one request that you are making.

Good luck with it,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Purge the Nginx cache

kaushalshriyan April 22, 2022 12:38PM

Re: Purge the Nginx cache

Sergey A. Osokin April 22, 2022 01:02PM

Re: Purge the Nginx cache

kaushalshriyan April 22, 2022 01:32PM

Re: Purge the Nginx cache

Sergey A. Osokin April 22, 2022 01:42PM

Re: Purge the Nginx cache

kaushalshriyan April 22, 2022 01:56PM

Re: Purge the Nginx cache Attachments

kaushalshriyan April 26, 2022 02:02PM

Re: Purge the Nginx cache

kaushalshriyan April 26, 2022 02:28PM

Re: Purge the Nginx cache

Sergey A. Osokin April 26, 2022 04:44PM

Re: Purge the Nginx cache Attachments

kaushalshriyan April 28, 2022 03:30PM

Re: Purge the Nginx cache

kaushalshriyan April 29, 2022 02:20PM

Re: Purge the Nginx cache

kaushalshriyan May 02, 2022 03:10PM

Re: Purge the Nginx cache

Francis Daly May 03, 2022 04:30AM

Re: Purge the Nginx cache Attachments

kaushalshriyan May 03, 2022 06:34AM

Re: Purge the Nginx cache

Francis Daly May 03, 2022 08:02AM

Re: Purge the Nginx cache Attachments

kaushalshriyan May 03, 2022 12:22PM

Re: Purge the Nginx cache

Francis Daly May 04, 2022 09:10AM

Re: Purge the Nginx cache

Tammymeans May 17, 2022 08:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 299
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