[OpenSIPS-Users] Best way to load data into local cache

Schneur Rosenberg rosenberg11219 at gmail.com
Sat Feb 20 06:41:03 CET 2016


Why don't u use avp_db_query on demand and cache the info so u don't need
to run this particular query again?
On Feb 19, 2016 4:47 PM, "John Quick" <john.quick at smartvox.co.uk> wrote:

> Using version 2.1.1 of OpenSIPS
> I want to load several hundred records into local cache memory on startup.
> I've tried avp_db_query to read all data into an avp, then a loop to write
> it from the avp into cache memory, but it can only do 100 records at a
> time.
> Is this simply a limitation of all avp's?
>
> Is there another way, a better way?
>
> Why do I want to do this? Because I want to check each INVITE ruri
> destination username against a list of known "suspicious" destination
> prefixes (perhaps 1000 records). Each call may require several checks
> because the list contains prefixes of varying lengths. I am concerned that
> queries made directly to the MySQL table as each INVITE request is received
> could impair performance and would put constant unwanted load on the MySQL
> server.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
>
> _______________________________________________
> 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/20160220/725ab489/attachment-0001.htm>


More information about the Users mailing list