Re: [OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty?

2020-12-02 Thread Mark Allen
Good point - I'll do that On Wed, 2 Dec 2020 at 16:33, Liviu Chircu wrote: > On 02.12.2020 18:16, Mark Allen wrote: > > Thanks so much for your help Liviu. In the end, I used the $shv() approach > you suggested. It worked like a dream! :-) > > In opensips.cfg: > > loadmodule "cfgutils.so" >

Re: [OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty?

2020-12-02 Thread Liviu Chircu
On 02.12.2020 18:16, Mark Allen wrote: Thanks so much for your help Liviu. In the end, I used the $shv() approach you suggested. It worked like a dream! :-) In opensips.cfg:     loadmodule "cfgutils.so"         modparam("cfgutils", "shvset", "cacheValid=i:0")     route{         if ($shv(cache

Re: [OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty?

2020-12-02 Thread Mark Allen
Thanks so much for your help Liviu. In the end, I used the $shv() approach you suggested. It worked like a dream! :-) In opensips.cfg: loadmodule "cfgutils.so" modparam("cfgutils", "shvset", "cacheValid=i:0") route{ if ($shv(cacheValid) == 0) { xlog("Reloadin

Re: [OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty?

2020-11-25 Thread Liviu Chircu
On 25.11.2020 16:18, Mark Allen wrote: If the DB table is updated I can flush the cache of the old data with "opensips-cli -x mi cache_remove_chunk". I would then want to have a test in OpenSIPS that says that if the cache is empty, re-populate it from the DB. Is this possible? Hi, Mark! Fro

[OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty?

2020-11-25 Thread Mark Allen
Is there a simple way to test if a cache has any values stored? I have a cache collection holding a number of IP addresses that are read on startup from a local DB. If the DB table is updated I can flush the cache of the old data with "opensips-cli -x mi cache_remove_chunk". I would then want to h