{"repo":"magiclen/nginx-cache-purge","free":true,"listed":false,"github":"https://github.com/magiclen/nginx-cache-purge","clone":"git clone https://github.com/magiclen/nginx-cache-purge.git","description":"An alternative way to do `proxy_cache_purge` or `fastcgi_cache_purge` for Nginx.","language":"Rust","stars":60,"topics":["rust","nginx","cache","cli"],"license":null,"category":"cli-tools","readme_excerpt":"Nginx Cache Purge ==================== An alternative way to do proxy cache purge or fastcgi cache purge for Nginx. Usage Installation / Uninstallation From crates.io, From GitHub (Linux x86 64), CLI Help If the purge command successfully removes any cache, it returns the exit status 0 . If no cache needs to be removed, it returns the exit status 44 . Key Patterns A in a key matches any sequence of characters. A key without a trailing has to match the whole cache key. Pattern Matches ------- ------- http/blog/ exactly the key http/blog/ http/blog every key which starts with http/blog /help every key which ends with /help /help every key which contains /help every key Levels The levels argument has to be the same as the one set by proxy cache path or fastcgi cache path . Since levels is optional for Nginx, it may be empty here as well, which means every cache file sits directly in the cache directory. Nginx + Nginx Cache Purge Start the Service of Nginx Cache Purge (systemd for example) Assume we have already put the executable file nginx-cache-purge in /usr/local/bin/ . /etc/systemd/system/nginx-cache-purge.service Each --zone takes three values: the name that purge requests refer to, the path and the levels set by proxy cache path or fastcgi cache path . It can be used more than once. The socket is created with mode 0660 , so Nginx and the service need a shared user or group that can access it. The systemd example above uses www-data for both. Defining a zone is strongly rec","default_branch":null,"files":null,"tree":[],"storefront":"/r/magiclen","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/magiclen/nginx-cache-purge/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}