Can somebody confirm that proxy_cache_purge is working with nginx/0.8.34.
I just tested it and it works just fine.
Can you confirm that URL that you’re trying to purge is indeed cached?
Can you post access logs (preferably with $upstream_cache_status) for
the
cached URL and for failed purges?
Piotr - is there any way to get proxy_cache_purge to log its activity? I
am not sure it is even working, although I do not get any error message
when restarting NGINX.
GET /test-2/2220 upstream_cache_status HIT
GET /purge/test-2/2220 upstream_cache_status -
Just to make sure: are you requesting purges from localhost (127.0.0.1)?
Piotr - is there any way to get proxy_cache_purge to log its activity? I
am not sure it is even working, although I do not get any error message
when restarting NGINX.
At this time it only logs successful purges at http debug level and
failures
to delete files from hard disk at critical level.
It seems that I keep getting upstream_cache_status UPDATING
Does that mean the purging is scheduled somehow?
Thanks for all your help Piotr but I don’t want to waste your time
indefinitely.
All I need is to see the activity log for proxy_cache_purge, and we can go
from there.
All you need to do is use proper access list. There is no activity when
your
request is blocked in the access phase.
Question: what am I supposed to see/get after a successful purge?
Thanks for all your help Piotr but I don’t want to waste your time
indefinitely.
All I need is to see the activity log for proxy_cache_purge, and we can
go from there.
I cannot investigate your problem when you’re giving me false data.
I believe that, if cache file doesn’t exist response is still 404.
Yes, it is.
Wouldn’t be helpful to return a message “cache file does not exists”
instead of a 404.
No, 404 is standard HTTP response code for “File Not Found” and it is
exactly the response that any sane person would expect when “cached
file”
does not exist. There is no way that this is gonna change.
Now, seeing is believing – I gave it another try and it actually gave
me the response similar to the screenshot.
Not sure why but it is very sporadic. I believe that, if cache file
doesn’t exist response is still 404.
Of course, the cache file exists, therefore question is - why so
sporadic.
Wouldn’t be helpful to return a message “cache file does not exists”
instead of a 404.
Thanks again.
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.