[OpenSIPS-Users] OpenSIPS 3.1 - Test if cache is empty?
Liviu Chircu
liviu at opensips.org
Wed Dec 2 16:33:45 EST 2020
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(cacheValid) == 0) {
Glad it worked! Depending on the volume of traffic flowing through your
instance, maybe it would be better to perform the "is cache valid" check
within a timer route [1] at a frequency of your choosing, rather than on
each SIP request.
[1]: https://www.opensips.org/Documentation/Script-Routes-3-2#toc8
--
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20201202/a1ac1c66/attachment.html>
More information about the Users
mailing list