Ngx_cache_purge + query string

Hi,

is ngx_cache_purge support to purge file with query string? I’ve tried
with no success

Our example page

http://www.example.com/images/file.jpg?v=1.0

Is there any additional config I have to put?

Hello,

is ngx_cache_purge support to purge file with query string?

Yes.

I’ve tried with no success

Our example page

http://www.example.com/images/file.jpg?v=1.0

Is there any additional config I have to put?

You didn’t provide your current config, so no one can tell.

Best regards,
Piotr S.

Hi,

Below is my config

location ~ /purge(/.*) {
allow 127.0.0.1;
allow 10.10.0.0/24;
deny all;
proxy_cache_purge one backend$1;
}

On Monday, May 5, 2014 4:20 PM, Piotr S. [email protected]
wrote:

Hello,

is ngx_cache_purge support to purge file with query string?

Yes.

I’ve tried with no success

Our example page

http://www.example.com/images/file.jpg?v=1.0

Is there any additional config I have to put?

You didn’t provide your current config, so no one can tell.

Best regards,
Piotr S.

Hello,

Below is my config

    location ~ /purge(/.*) {
            allow   127.0.0.1;
            allow   10.10.0.0/24;
            deny    all;
            proxy_cache_purge  one  backend$1;
    }

$1 doesn’t contain query strings, you should use:

proxy_cache_purge  one  backend$1$is_args$args;

or alternatively, use “same location” configuration. Please refer to
the documentation for details.

Best regards,
Piotr S.

Thanks!

On Monday, May 5, 2014 5:35 PM, Piotr S. [email protected]
wrote:

Hello,

Below is my config

location ~ /purge(/.*) {
    allow  127.0.0.1;
    allow  10.10.0.0/24;
    deny  all;
    proxy_cache_purge one backend$1;
}

$1 doesn’t contain query strings, you should use:

proxy_cache_purge one backend$1$is_args$args;

or alternatively, use “same location” configuration. Please refer to
the documentation for details.

Best regards,
Piotr S.