[OpenSIPS-Users] How to update table location, but directly on memory cache (RAM)?
Bogdan-Andrei Iancu
bogdan at opensips.org
Fri Jun 10 12:39:09 CEST 2016
Hi Rodrigo,
What you try to do is not consistent.
Either you use db_mode 1 to be have immediate writting in DB from usrloc
module (see
http://www.opensips.org/html/docs/modules/1.11.x/usrloc.html#id294459)
-> it will be safe to run your script query after the save().
Either push the extra info you want to save into DB (and memory cache)
via the attr AVP (see
http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id293909) and
opensips will do everything for you.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 09.06.2016 17:42, Rodrigo Pimenta Carvalho wrote:
>
>
> Hi.
>
>
> My script has the configuration:
>
>
> modparam("usrloc", "db_mode", 2)
> modparam("usrloc", "timer_interval",3)
>
> Always after receiving a new register in table location, I must to
> execute a code like this:
>
> avp_db_query("UPDATE location...
>
>
> That is, an update will complement data in the new register.
>
>
> However, how could I immediately update table location if data might
> be in memory cache (RAM) for 3 seconds. It could fail obviously.
>
> The command avp_db_query UPDATE is acting over the database on hard
> disc, not in obviously.
>
> So, is there a way to update table location even still in cache (RAM)?
> If yes, when data from RAM is recorded into the database, the register
> will already be updated.
>
>
> Any hint will be very helpful!
>
>
> Best regards.
>
>
> RODRIGO PIMENTA CARVALHO
> Inatel Competence Center
> Software
> Ph: +55 35 3471 9200 RAMAL 979
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160610/03b957b0/attachment.htm>
More information about the Users
mailing list