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 <wasp...@gmail.com> wrote:
> 
> 
> On Wed, Sep 21, 2016 at 9:02 PM, Bogdan-Andrei Iancu <bog...@opensips.org 
> <mailto:bog...@opensips.org>> 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
> Users@lists.opensips.org <mailto:Users@lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users 
> <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>_______________________________________________
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to