<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 &lt;<a href="mailto:wasphin@gmail.com" class="">wasphin@gmail.com</a>&gt; 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 &lt;<a href="mailto:bogdan@opensips.org" class="">bogdan@opensips.org</a>&gt; wrote:<br class="">&gt;<br class="">&gt; When you add the values in local cache, for each value you have to set a different key. Instead of :<br class="">&gt; &nbsp; &nbsp; &nbsp; &nbsp;<br class="">&gt; &nbsp; &nbsp; cache_store("local", "domain", "$(avp(domains)[$var(id)])");<br class="">&gt; do<br class="">&gt; &nbsp; &nbsp; cache_store("local", "domain_$var(id)", "$(avp(domains)[$var(id)])");<br class="">&gt;<br class="">&gt; By doing that, you add one key for each domain value.<br class="">&gt;<br class="">&gt; Then you can iterate and fetch from cache the domain_$var(id) until nothing is returned anymore.<br class="">&gt;<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>