FAQ

Page Discussion Edit History

NginxChsCachePurge

Contents

[edit] ngx_cache_purge

鏈ā鍧楃敱绗笁鏂规彁渚涳紝涓嶅寘鍚湪 Nginx 鐨勬簮鐮佸彂甯冪増涓

[edit] 璇存槑

ngx_cache_purge is nginx module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches.

[edit] 瀹夎

涓嬭浇妯″潡婧愮爜锛ngx_cache_purge-1.2(鏇存柊璁板綍)
(SHA1: d9468cf42432e81ea3a110ec63aae2eb273f5516)

鍏朵粬鐗堟湰

瑙e帇锛岀劧鍚庣紪璇戯細

./configure
make && make install

[edit] 閰嶇疆鎸囦护

 fastcgi_cache_purge zone_name key (context: location)

Sets area and key used for purging selected pages from FastCGI's cache.

 proxy_cache_purge zone_name key (context: location)

Sets area and key used for purging selected pages from proxy's cache.

 scgi_cache_purge zone_name key (context: location)

Sets area and key used for purging selected pages from SCGI's cache.

 uwsgi_cache_purge zone_name key (context: location)

Sets area and key used for purging selected pages from uWSGI's cache.

[edit] 绀轰緥閰嶇疆

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;
        }
    }
}

[edit] SPONSORS

Work on the original patch was fully funded by yo.se.