<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You could probably also built a JSON array from looping through the avp and store that as the value in the cache store.<div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 21, 2016, at 8:18 AM, xiaofeng <<a href="mailto:wasphin@gmail.com" class="">wasphin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class="">On Wed, Sep 21, 2016 at 9:02 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" class="">bogdan@opensips.org</a>> wrote:<br class="">><br class="">> When you add the values in local cache, for each value you have to set a different key. Instead of :<br class="">> <br class="">> cache_store("local", "domain", "$(avp(domains)[$var(id)])");<br class="">> do<br class="">> cache_store("local", "domain_$var(id)", "$(avp(domains)[$var(id)])");<br class="">><br class="">> By doing that, you add one key for each domain value.<br class="">><br class="">> Then you can iterate and fetch from cache the domain_$var(id) until nothing is returned anymore.<br class="">><br class=""><br class=""><div class="">Ah, yes, that should work, thanks, Bogdan.<br class=""><br class="">Regards,<div class=""><br class="">xiaofeng<div class=""><br class=""><div class="">_______________________________________________<br class="">Users mailing list<br class=""><a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class=""><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" class="">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></div></div></div></div></div>
_______________________________________________<br class="">Users mailing list<br class=""><a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class="">http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br class=""></div></blockquote></div><br class=""></div></div></body></html>