You could probably also built a JSON array from looping through the avp and 
store that as the value in the cache store.

> On Sep 21, 2016, at 8:18 AM, xiaofeng <[email protected]> wrote:
> 
> 
> On Wed, Sep 21, 2016 at 9:02 PM, Bogdan-Andrei Iancu <[email protected] 
> <mailto:[email protected]>> wrote:
> >
> > When you add the values in local cache, for each value you have to set a 
> > different key. Instead of :
> >        
> >     cache_store("local", "domain", "$(avp(domains)[$var(id)])");
> > do
> >     cache_store("local", "domain_$var(id)", "$(avp(domains)[$var(id)])");
> >
> > By doing that, you add one key for each domain value.
> >
> > Then you can iterate and fetch from cache the domain_$var(id) until nothing 
> > is returned anymore.
> >
> 
> Ah, yes, that should work, thanks, Bogdan.
> 
> Regards,
> 
> xiaofeng
> 
> _______________________________________________
> Users mailing list
> [email protected] <mailto:[email protected]>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
> <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>_______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to