Last active
October 25, 2015 09:36
-
-
Save chaeplin/3ed25dc226ffe5229782 to your computer and use it in GitHub Desktop.
srcache.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/openresty/srcache-nginx-module | |
# | |
#srcache_store_max_size 5M; | |
# | |
map $cookie_ologin $skip_cookie { | |
default 0; | |
1 1; | |
} | |
# | |
map $upstream_http_X_Authed_Site $skip_header { | |
default 0; | |
WWWWSITE 1; | |
} | |
# | |
location / { | |
if ($request_method = POST) { | |
proxy_pass http://www-wwwlb; | |
break; | |
} | |
srcache_response_cache_control off; | |
srcache_store_no_store on; | |
srcache_store_no_cache on; | |
srcache_store_private on; | |
srcache_fetch_skip $skip_cookie; | |
srcache_store_skip $skip_header; | |
srcache_store_hide_header X-Authed-Site; | |
set $key $uri$args$request_method; | |
srcache_fetch GET /memc60 $key; | |
srcache_store PUT /memc60 $key; | |
proxy_pass http://www-wwwlb; | |
} | |
location = /memc60 { | |
internal; | |
set_md5 $digest $query_string; | |
set $memc_key $digest; | |
set $memc_exptime 60; # in seconds | |
memc_pass memc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment