<div dir="ltr">Hi , <div><br></div><div>I am trying to do memory caching for authentication .  Followed the below link. </div><div><a href="https://www.opensips.org/Documentation/Tutorials-MemoryCaching">https://www.opensips.org/Documentation/Tutorials-MemoryCaching</a> </div><div><br></div><div>my DB looks like below . </div>| id | username | domain  Â  Â  Â  Â  Â  Â  Â | password | email_address | ha1 | ha1b | rpid |<br>+----+----------+--------------------------------------------+----------+---------------+-----+------+------+<br>| Â 1 | 7878 Â  Â  | <a href="http://fs-reg.i3clogic.com">fs-reg.i3clogic.com</a> | som123 | Â  Â  Â  Â  Â  Â  Â  | Â  Â  | Â  Â  Â | NULL |<br><div> <br></div><div>loadmodule "cachedb_local.so"<br>#loading auth module<br>loadmodule "auth.so"<br>loadmodule "auth_db.so"<br><br>modparam("auth_db", "db_url", "mysql://root:cccl0g1c@localhost/opensips")<br>modparam("auth_db", "calculate_ha1", yes)<br>modparam("auth_db", "user_column", "username")<br>#modparam("auth_db", "use_domain", 1)<br>modparam("auth_db", "domain_column", "domain")<br>modparam("auth_db", "password_column", "password")<br>modparam("auth_db", "load_credentials", "$avp(55)=password")<br><br>modparam("auth","username_spec","$avp(54)")<br>modparam("auth","password_spec","$avp(55)")<br></div><div><br></div><div> if(cache_fetch("local","passwd_$tu",$avp(55))) {<br>  Â  Â  Â  Â  Â  Â  Â  $avp(54) = $tU;<br>  Â  Â  Â  Â  Â  Â  Â  if (!pv_www_authorize("")) {<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  # authentication failed -> do challenge<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  www_challenge("", "1");<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;<br>  Â  Â  Â  Â  Â  Â  Â  };<br>  Â  Â  Â  } else {<br>  Â  Â  Â  Â  Â  Â  Â  if (!www_authorize("", "subscriber")) {<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  # authentication failed -> do challenge<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  www_challenge("", "1");<br>  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  exit;<br>  Â  Â  Â  Â  Â  Â  Â  };<br>  Â  Â  Â  Â  Â  Â  Â  # after DB authentication, the password is available<br>  Â  Â  Â  Â  Â  Â  Â  cache_store("local","passwd_$tu","$avp(55)",1200);<br>  Â  Â  Â  }<br></div><div><br></div><div><br></div><div>This thing I have done . While doing DB authentication its working , but which doing through memory caching its giving error "Incorrect Password" . Whats wrong I  am doing . please help me . </div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><b><i>Thanks & Regards</i></b><div><i>Sasmita Panda</i></div><div><i>Senior Network Testing and Software Engineer</i></div><div><i>3CLogic , ph:07827611765</i></div></div></div></div></div></div></div></div>