[OpenSIPS-Users] redis HMGET nil value problem
jayesh1017 at gmail.com
Thu May 28 15:21:02 CEST 2015
I'm using cache_raw queries to get data from redis and I have a problem
with accessing nil values that gets returned from it.
For eg I do the following:
cache_raw_query("redis:myRedis HMGET one two three", "$avp(result)");
Here the value of one is abc, two is not present in redis and three is xyz.
Now if I access the values, I ideally expect it to be the following:
$(avp(result)) = xyz, $(avp(result)) = <null> and $(avp(result)) =
But since key two is not present in redis for whatever reasons, the result
I get back is:
$(avp(result)) = xyz
$(avp(result)) = abc
$(avp(result)) = <null>
This actually makes my value matching go for a toss. Is there a better
solution to access the array that is returned back from redis or at least
store the value as NULL in that array element of avp. Any help is greatly
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users