Welcome! Log In Create A New Profile

Advanced

Is there a better way?

February 18, 2011 10:06AM
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
Subject Author Posted

Is there a better way?

iberkner February 18, 2011 10:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
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