Use proxy store with url parameters

I have been trying to get proxy_store to work with a url of the form /
resource?resourceId=XXX where XXX is a number. This url actually
returns a graphic from a database which does not change often. Is is
possible to have proxy store work in this case where the XXX is the
only part of the URL which is any different?

My most recent attempt:

     location /resource {
             root /var/www/data/fetch;
             error_page 404 = /fetch$args;
     }
     location ^~ /fetch/ {
             internal;
             proxy_pass  http://10.0.3.197:8246;
             proxy_store /var/www/data/fetch$args;
             proxy_store_access user:rw group:rw all:r;
     }

Regards,
Casey

Try replacing /fetch/$args in your proxy_store statement with $request_uri. It should already be rewritten from the error_page
statement.

e.g.

  •           proxy_store /var/www/data/fetch$args;
    
  •           proxy_store /var/www/data$request_uri;