Is there a better way?

iberkner at gmail.com iberkner at gmail.com
Fri Feb 18 18:03:14 MSK 2011


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®


More information about the nginx mailing list