Nginx系列教程:ngx_cache_purge模組
轉自:http://www.ithov.com/linux/116779.shtml
ngx_cache_purge
本模組由第三方提供,不包含在 Nginx 的原始碼釋出版中。
概述
ngx_cache_purge是nginx模組,用於從FastCGI、proxy、SCGI 和uWSGI快取中增加內容清除功能。
安裝
下載模組原始碼:ngx_cache_purge-1.2(更新記錄)
(SHA1: d9468cf42432e81ea3a110ec63aae2eb273f5516)
解壓,然後編譯:
./configure
make && make install
配置指令
fastcgi_cache_purge zone_name key (context: location)
使用area and key設定 FastCGI快取的所選清除頁面。
proxy_cache_purge zone_name key (context: location)
使用area and key設定proxy快取的所選清除頁面。
scgi_cache_purge zone_name key (context: location)
使用area and key設定SCGI快取的所選清除頁面。
uwsgi_cache_purge zone_name key (context: location)
使用area and key設定uWSGI快取的所選清除頁面。
示例配置
http {
proxy_cache_path /tmp/cache keys_zone=tmpcache:10m;
server {
location / {
proxy_pass http://127.0.0.1:8000;
proxy_cache tmpcache;
proxy_cache_key $uri$is_args$args;
}
location ~ /purge(/.*) {
allow 127.0.0.1;
deny all;
proxy_cache_purge tmpcache $1$is_args$args;
}
}
}
相關文章
- Thrift RPC 系列教程(3)——模組化RPC
- NGINX模組(一)Nginx
- NGINX模組(二)Nginx
- odoo 開發入門教程系列-模組互動Odoo
- Nginx的Uwsgi模組(部分模組指令)Nginx
- Angular入門到精通系列教程(11)- 模組(NgModule),延遲載入模組Angular
- Docker系列教程06-實戰:修改Nginx首頁DockerNginx
- Nginx 新增 lua 模組Nginx
- 為 Nginx 新增模組Nginx
- Nginx常用的模組Nginx
- nginx模組開發Nginx
- Nginx的Uwsgi模組Nginx
- Nginx安裝nginx-rtmp-module模組Nginx
- nginx學習之模組Nginx
- nginx安裝echo模組Nginx
- nginx image_filter模組NginxFilter
- nginx加強安全模組Nginx
- nginx系列-概念Nginx
- 《Python 簡明教程》讀書筆記系列三 —— 模組Python筆記
- Nginx 容器教程Nginx
- Nginx簡介–nginx系列之一Nginx
- Nginx為已安裝nginx動態新增模組Nginx
- Nginx原始碼研究之nginx限流模組詳解Nginx原始碼
- nginx新增sticky cookie 分流模組NginxCookie
- nginx的Split Clients模組薦Nginxclient
- Nginx 模組-細節詳探Nginx
- Nginx 極簡教程Nginx
- Nginx 詳細教程Nginx
- nginx常用配置教程。Nginx
- Nginx 教程(2):效能Nginx
- nginx簡易教程Nginx
- NGINX簡明教程Nginx
- nginx 簡略教程Nginx
- 模組化日常(系列)
- nginx使用熱部署新增新模組Nginx熱部署
- Nginx使用SSL模組配置httpsNginxHTTP
- Nginx使用Lua模組實現WAFNginx
- nginx事件模組 -- 第二篇Nginx事件