forked from FRiCKLE/ngx_cache_purge
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
That is what I have to initiate cache:
uwsgi_cache vsp-cache;
uwsgi_cache_lock on;
uwsgi_cache_lock_timeout 5s;
uwsgi_cache_valid 15m;
uwsgi_cache_key "$role:$proxy_host$uri$is_args$args:$request_body_md5";
uwsgi_cache_methods GET HEAD POST;
As it is shown I cache not only GET and HEAD methods but POST methods as well.
Purging is realized in a separate location with a key being passed within the url path:
location ~ ^/purge/develop/(.*) { #text
allow 127.0.0.1;
uwsgi_cache_purge vsp-cache $1;
}
When I try to purge a cached GET request with the key associated with that request everything works just fine and the cached request is removed. But the same logic doesn't work when I try to purge a cached POST request. I get a response with 412 status code which means the key is not found I suppose.
The question is how to purge a cached POST request from NGINX cache with a key passed in the url path?
Metadata
Metadata
Assignees
Labels
No labels