Welcome! Log In Create A New Profile

Advanced

Unable to cache long cache url

May 15, 2014 12:23PM
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%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

____________ 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;

}
}
Subject Author Posted

Unable to cache long cache url

samgujrat1984 May 15, 2014 12:23PM

Re: Unable to cache long cache url

Francis Daly May 18, 2014 04:44AM

Re: Unable to cache long cache url

samgujrat1984 May 20, 2014 11:27AM

Re: Unable to cache long cache url

Francis Daly May 21, 2014 05:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 246
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready