Skip to content

Commit 6342f4d

Browse files
committed
ngx_cache_purge-1.0
0 parents  commit 6342f4d

File tree

5 files changed

+582
-0
lines changed

5 files changed

+582
-0
lines changed

CHANGES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2010-01-10 VERSION 1.0
2+
* Initial module release.
3+
4+
2009-11-17
5+
* Fix patch compatibility with nginx-0.8.11+.
6+
Reported by Bing Ran.
7+
8+
2009-08-11
9+
* Initial patch release.

LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2009-2010, FRiCKLE Piotr Sikora <[email protected]>
2+
All rights reserved.
3+
4+
This project was fully funded by yo.se.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions
8+
are met:
9+
1. Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
2. Redistributions in binary form must reproduce the above copyright
12+
notice, this list of conditions and the following disclaimer in the
13+
documentation and/or other materials provided with the distribution.
14+
15+
THIS SOFTWARE IS PROVIDED BY FRiCKLE PIOTR SIKORA AND CONTRIBUTORS
16+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FRiCKLE PIOTR
19+
SIKORA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
ABOUT:
2+
------
3+
ngx_cache_purge is a module which adds ability to purge content
4+
from FastCGI and proxy caches.
5+
6+
This module is rewrite of cache_purge patch, which is successfully
7+
used in production on number of high traffic sites.
8+
9+
10+
SPONSORS:
11+
---------
12+
Work on the original patch was fully funded by yo.se.
13+
14+
15+
CONFIGURATION DIRECTIVES:
16+
-------------------------
17+
18+
fastcgi_cache_purge zone_name key (context: location)
19+
-----------------------------------------------------
20+
Sets area and key used for purging selected pages from FastCGI's cache.
21+
22+
proxy_cache_purge zone_name key (context: location)
23+
---------------------------------------------------
24+
Sets area and key used for purging selected pages from proxy's cache.
25+
26+
27+
EXAMPLE CONFIGURATION:
28+
----------------------
29+
http {
30+
proxy_cache_path /tmp/cache keys_zone=tmpcache:10m;
31+
32+
server {
33+
location / {
34+
proxy_pass http://127.0.0.1:8000;
35+
proxy_cache tmpcache;
36+
proxy_cache_key $uri$is_args$args;
37+
}
38+
39+
location ~ /purge(/.*) {
40+
allow 127.0.0.1;
41+
deny all;
42+
proxy_cache_purge tmpcache $1$is_args$args;
43+
}
44+
}
45+
}

config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ngx_addon_name=ngx_http_cache_purge_module
2+
HTTP_MODULES="$HTTP_MODULES ngx_http_cache_purge_module"
3+
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_cache_purge_module.c"

0 commit comments

Comments
 (0)