2011年2月18日星期五

Is there a better way?

location /assets/ {
if ($uri ~ "^/assets/([a-zA-Z0-9]+)(/.+)") {
#$1 is hash, $2 is uri
set $memcached_key "$1_$2";
memcached_pass localhost:11211;

#fallback if not in memcached
error_page 404 =200 /libraries/domain/asset_filter/client/static.php?hash=$1&uri=$2;
}
}

This works but is there a better way?
Sent on the Sprint® Now Network from my BlackBerry®
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论