@@ -123,7 +123,7 @@ Sample configuration (same location syntax)
123
123
location / {
124
124
proxy_pass http://127.0.0.1:8000;
125
125
proxy_cache tmpcache;
126
- proxy_cache_key $uri$is_args$args;
126
+ proxy_cache_key " $uri$is_args$args" ;
127
127
proxy_cache_purge PURGE from 127.0.0.1;
128
128
}
129
129
}
@@ -139,7 +139,7 @@ Sample configuration (same location syntax - purge all cached files)
139
139
location / {
140
140
proxy_pass http://127.0.0.1:8000;
141
141
proxy_cache tmpcache;
142
- proxy_cache_key $uri$is_args$args;
142
+ proxy_cache_key " $uri$is_args$args" ;
143
143
proxy_cache_purge PURGE purge_all from 127.0.0.1;
144
144
}
145
145
}
@@ -155,13 +155,14 @@ Sample configuration (separate location syntax)
155
155
location / {
156
156
proxy_pass http://127.0.0.1:8000;
157
157
proxy_cache tmpcache;
158
- proxy_cache_key $uri$is_args$args;
158
+ proxy_cache_key " $uri$is_args$args" ;
159
159
}
160
160
161
161
location ~ /purge(/.*) {
162
162
allow 127.0.0.1;
163
163
deny all;
164
- proxy_cache_purge tmpcache $1$is_args$args;
164
+ proxy_cache tmpcache;
165
+ proxy_cache_key "$1$is_args$args";
165
166
}
166
167
}
167
168
}
@@ -180,20 +181,23 @@ Sample configuration (Optional)
180
181
location / { #json
181
182
proxy_pass http://127.0.0.1:8000;
182
183
proxy_cache tmpcache;
183
- proxy_cache_key $uri$is_args$args;
184
+ proxy_cache_key " $uri$is_args$args" ;
184
185
}
185
186
186
187
location ~ /purge(/.*) { #xml
187
188
allow 127.0.0.1;
188
189
deny all;
189
- proxy_cache_purge tmpcache $1$is_args$args;
190
+ proxy_cache tmpcache;
191
+ proxy_cache_key "$1$is_args$args";
190
192
cache_purge_response_type xml;
191
193
}
192
194
193
195
location ~ /purge2(/.*) { # json
194
196
allow 127.0.0.1;
195
197
deny all;
196
- proxy_cache_purge tmpcache $1$is_args$args;
198
+ proxy_cache tmpcache;
199
+ proxy_cache_key "$1$is_args$args";
200
+ cache_purge_response_type json;
197
201
}
198
202
}
199
203
@@ -202,19 +206,21 @@ Sample configuration (Optional)
202
206
location / { #text
203
207
proxy_pass http://127.0.0.1:8000;
204
208
proxy_cache tmpcache;
205
- proxy_cache_key $uri$is_args$args;
209
+ proxy_cache_key " $uri$is_args$args" ;
206
210
}
207
211
208
212
location ~ /purge(/.*) { #text
209
213
allow 127.0.0.1;
210
214
deny all;
211
- proxy_cache_purge tmpcache $1$is_args$args;
215
+ proxy_cache tmpcache;
216
+ proxy_cache_key "$1$is_args$args";
212
217
}
213
218
214
219
location ~ /purge2(/.*) { #html
215
220
allow 127.0.0.1;
216
221
deny all;
217
- proxy_cache_purge tmpcache $1$is_args$args;
222
+ proxy_cache tmpcache;
223
+ proxy_cache_key "$1$is_args$args";
218
224
cache_purge_response_type html;
219
225
}
220
226
}
0 commit comments