My English is not good and please forgive my bad grammer.
I want only .jpg and .gif be cached, so I wrote:
location ~ .*\.(jpg|gif)$
{
proxy_cache cache1;
proxy_cache_valid 200 304 15m;
proxy_cache_key $host$uri$is_args$args;
proxy_pass http://backend;
}
location /
{
proxy_pass http://backend;
}
and here comes a problem: you can't purge any more, browser show: 404
And, how can I don't cache a path-like url ? i.e., http://www.test.com/ or http://www.test.com/path/
Help pls!