andrew - 2011-11-25

in article, part "3.8  Subscriber caching" refered to script there is such code block:
if(cache_fetch("local","passwd_$tu",$avp(i:55))) {
$avp(i:54) = $fU;
# xlog("found in cache - user = `$avp(i:54)` , pwd = `$avp(i:55)`\n");
# xlog("SCRIPT: stored password is $avp(i:55)\n");
# perform auth from variables
# $avp(i:54) contains the username
# $avp(i:55) contains the password
if (!pv_proxy_authorize("")) {
# authentication failed -> do challenge
# xlog("user $avp(i:54) failed to auth\n");
proxy_challenge("", "0");
..but as says tutorial (part 3.4  Improvements):
"NOTE: for WWW authentication the authentication name is extracted from TO hedear, but for PROXY authentication the auth name is extracted from FROM header, so when operating with the cache, build the attribute name as "passwd_$tU" for WWW auth and as "passwd_$fU" for PROXY auth."
..if i'mnot misstaken than correct cache related calls in this script should be:
cache_fetch("local","passwd_$fu",$avp(i:55))) and cache_store("local","passwd_$fu","$avp(i:55)",1200);

thank you!