[OpenSIPS-Users] sql_cacher with cachedb_local

Răzvan Crainea razvan at opensips.org
Tue Oct 1 06:04:02 EDT 2019


Hi, Mehdi!

Unfortunately there's no way you could fetch the cached values, as these 
are only loaded _after_ the startup_route is ran. So even if you go over 
MI to the MI interface, you will still not get the value.
You may try to set the sql_cacher in an on_demand mode.

Best regards,
Răzvan

On 9/21/19 4:27 PM, Mehdi Shirazi wrote:
> Hi
> Is there a way to see content of sql_cacher loaded inside of 
> cachedb_local with "mi cache_fetch" command ?
> 
> |Regards
> |
> 
> |M.Shirazi
> |
> 
> 
> On Mon, Sep 16, 2019 at 6:23 PM Mehdi Shirazi <m.shirazi at gmail.com 
> <mailto:m.shirazi at gmail.com>> wrote:
> 
>     Hi
>     Thanks for reply.
>     inside main route it was working ok but inside startup_route (2.4.6
>     and 3.0) not working.
>     Regards
>     M.Shirazi
> 
>     On Thu, Sep 12, 2019 at 8:16 PM Bogdan-Andrei Iancu
>     <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
> 
>         HI Mehdi,
> 
>         Do you get that error only when using it from startup_route ?
> 
>         Also, try to change the cachedb_url to "local:///collection2"
> 
>         Regards,
> 
>         Bogdan-Andrei Iancu
> 
>         OpenSIPS Founder and Developer
>            https://www.opensips-solutions.com
>         OpenSIPS Summit 2019
>            https://www.opensips.org/events/Summit-2019Amsterdam/
> 
>         On 8/30/19 10:12 AM, Mehdi Shirazi wrote:
>>         Hi
>>         Please help me configuring sql_cacher.
>>         I use Opensips 2.4.6 .
>>         modparam("cachedb_local", "cachedb_url",
>>         "local:group2:///collection2")
>>         modparam("sql_cacher", "cache_table",
>>         "id=st_caching
>>         db_url=mysql://opensips:1234ms@localhost/opensips
>>         cachedb_url=local:group2:///collection2
>>         table=STrig
>>         key=number
>>         columns=cause")
>>         startup_route {
>>             xlog("The cause is
>>         $sql_cached_value(st_caching:cause:88443322)");
>>             }
>>         in log:
>>         ERROR:sql_cacher:get_rld_vers_from_cache: Failed to get reload
>>         version integer from cachedb
>>         ERROR:sql_cacher:pv_get_sql_cached_value: Error fetching from
>>         cachedb
>>
>>         Regards
>>         M.Shirazi
>>
>>
>>         _______________________________________________
>>         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
> 

-- 
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com



More information about the Users mailing list