Unable to cache long cache url

Hello Every One,

I am trying to cache a long string query url with proxy_cache_key. I am
not
sure where I am doing wrong. I tried different proxy_cache_key patterns.
Not
sure where I am doing wrong. If some one can suggest me please

http://x.x.x.x/uri/splash?TF=100%&US=A&AR=D&TD=%2450&BR=T&TS=12515f542140&OR=%2410%2F100MB&DN=BAQGBgEEBwQAAw%3D%3D&ET=TD&BE=1332d9a&BN=CS&AL=2000

____________ Configs _____________

location /keystone/splash {
proxy_pass http://x.x.x.x:8080/keystone/splash;

    set $no_cache "";
    if ($request_method !~ ^(GET|HEAD)$) {
        set $no_cache "1";
    }
    if ($no_cache = "1") {
        add_header Set-Cookie "_mcnc=1; Max-Age=2; Path=/";
        add_header X-Microcachable "0";
    }
    if ($http_cookie ~* "_mcnc") {
        set $no_cache "1";
    }
    proxy_no_cache $no_cache;
    proxy_cache_bypass $no_cache;
    proxy_cache webapp;
    #proxy_cache_key $scheme$host$request_method$request_uri;
    #proxy_cache_key

“$host$uri?TF=100%25&US=A&AR=D&TD=%2450&BR=T&TS=12515f542140&OR=%2410%2F100MB&DN=BAQGBgEEBwQAAw%3D%3D&ET=TD&BE=1332d9a&BN=CS&AL=2000&LG=E”;
#proxy_cache_key
“$host$uri?TF=100%25&US=A&AR=D&TD=%2450&BR=T&TS=12515f542140&OR=%2410%2F100MB&DN=BAQGBgEEBwQAAw%3D%3D&ET=TD&BE=1332d9a&BN=CS&AL=2000”;
#proxy_cache_key “$scheme://$host$uri$is_args”;
proxy_cache_key $uri$is_args?TF=$arg_TF &US=$arg_US
&AR=$arg_AR
&TD=$arg_TD&BR=$arg_BR&TS=$arg_TS&OR=$arg_OR&DN=$arg_DN&ET=$arg_ET&BE=$arg_BE&BN=$arg_BN&AL=$arg_AL;
proxy_cache_valid 200 302 60s;
proxy_cache_valid 301 60s;
proxy_cache_valid any 60s;
proxy_cache_use_stale updating;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_max_temp_file_size 1M;

}
}

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250126,250126#msg-250126

On Thu, May 15, 2014 at 12:23:06PM -0400, samgujrat1984 wrote:

Hi there,

I am trying to cache a long string query url with proxy_cache_key. I am not
sure where I am doing wrong. I tried different proxy_cache_key patterns. Not
sure where I am doing wrong. If some one can suggest me please

proxy_cache key is to decide whether two requests are the same for
caching
purposes (as in: can the second request be served with the cached
response
to the first?).

Which two requests do you want to be the same for caching?; and which
other requests do you want to be different?

From your mail, it is not obvious to me what you are trying to do.

f

Francis D. [email protected]

Francis D.,

Yes, I am trying the same functionality as you mentioned. I want to
serve
1st request from backend weblogic application and after that I want to
serve
same request for another hour from nginx cache.

Thanks!

Sam

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,250126,250241#msg-250241

On Tue, May 20, 2014 at 11:27:14AM -0400, samgujrat1984 wrote:

Hi there,

Yes, I am trying the same functionality as you mentioned. I want to serve
1st request from backend weblogic application and after that I want to serve
same request for another hour from nginx cache.

That sounds like it should just work, without any complicated
non-default
settings.

What specific problem are you seeing?

As in: what do you do; what do you see; what do you expect to see?

f

Francis D. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs