[OpenSIPS-Users] Cache design

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Jan 13 11:36:01 CET 2016


Hi John,

The cachedb_xxxxx module do implement support for different noSQL like 
DBs (local - in opensips memory, mongoDB, memcached, redis, etc). The 
sql_cache is new transparent way of caching an SQL table in OpenSIPS 
memory (while reading data from an SQL table).

the cache interface works over the cachedb_xxxxx modules. If you want to 
do a share cache (between several opensips instances), use an external 
nosql db (like redis, cassandra or mongo) and operate it from script via 
the cache API, in a similar way to do it for the "local" cache.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 13.01.2016 04:43, John Nash wrote:
> Yes I am also doing that with local cache but I was confused with 
> sql_cacher and with mongo db also it can be done?...I was just 
> wondering what are these for?
>
> On Wed, Jan 13, 2016 at 1:40 AM, <jarrod at unixc.org 
> <mailto:jarrod at unixc.org>> wrote:
>
>     John,
>
>     I do something similar for caching auth user id and passwords
>     using cachedb_redis/cachedb_local and db_postgres.
>
>     My basic logic first checks cache (cache_fetch) to see if the key
>     exists.  If it does I will pv_proxy_authorize using the value
>     stored in the populated avp from the fetch.  If the cache does not
>     exist, I will query Postgres (avp_db_query) and store
>     (cache_store) the value in cache with a lifetime so that it will
>     automatically repopulate at a later time.  The only time I may
>     adjust the cache out of band would be if the user modifies their
>     SIP password through the portal which causes the system to delete
>     the stale key/value from the cachedb store.
>
>     This may or may not address your concern, but I hope it helps.
>
>     Jarrod
>
>     > On Jan 12, 2016, at 1:54 PM, John Nash <john.nash778 at gmail.com
>     <mailto:john.nash778 at gmail.com>> wrote:
>     >
>     > I am using local cache db module in order to keep user id and
>     password in memory and now plan to keep some other data in memory
>     too and that I want to keep in some centralized cache.
>     >
>     > It will be like Opensips1, Opensips2.... <-----> Cache server
>     <---------> Postgresql
>     >
>     > I also need to periodically update cache (using some mi commands
>     may be)
>     >
>     > I saw many of the modules related to cache in opensips (Like
>     sql_cacher, cachedb_* , DB_CACHEDB)  and I am confused on what
>     should I use for my need and how these are all related.
>     >
>     > Any suggestions?
>     > _______________________________________________
>     > Users mailing list
>     > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> 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/20160113/53ba4c6c/attachment.htm>


More information about the Users mailing list