<div dir="auto">Memcache is a great fit for this. Load the data in externally or thru programmatic cache_miss. This method supports a very high rate per second. Just be sure to consider failure cases. Caches should never be expected to be right 100% of the time. They need to be expected and allowed to fail gracefully. </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 22, 2020 at 8:36 AM Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><br><br>  <br><br>    <br><br>  <br><br>  <div><br><br>    <div>On 22.09.2020 16:09, Alain Bieuzent<br><br>      wrote:<br><br><br>    </div><br><br>    <blockquote type="cite"><br><br>      <p class="MsoNormal"><span style="font-size:11pt" lang="EN-US">I<br><br>          need to store some data locally but accessible by opensips.<u></u><u></u></span></p><br><br>      <p class="MsoNormal"><span style="font-size:11pt" lang="EN-US">the<br><br>          data is almost 20 records made up of a couple IP: name<u></u><u></u></span></p><br><br>      <p class="MsoNormal"><span style="font-size:11pt" lang="EN-US">From<br><br>          opensips script I want to retrieve the name associated with<br><br>          the IP (to put in place profiling).<u></u><u></u></span></p><br><br>      <p class="MsoNormal"><span style="font-size:11pt" lang="EN">how<br><br>          do you set up this kind of solution without accessing each<br><br>          call to an external database?</span></p><br><br>    </blockquote><br><br>    <p>Hi, Alain!</p><br><br>    <p>One way would be to use the local cacheDB [1] module through the<br><br>      generic cacheDB scripting functions [2].<br><br><br>    </p><br><br>    <p>Alternatively, if you specifically need to load this data from an<br><br>      SQL DB, for example, the sql_cacher [3] module would be a perfect<br><br>      fit.</p><br><br>    <p>Fun Fact:  if you decide to use any of these two modules, you<br><br>      will have to buy a guy named Vlad a beer, and they are not the<br><br>      same Vlad.<br><br><br>    </p><br><br>    <p>Best regards,</p><br><br>    <p>[1]: <a href="https://opensips.org/docs/modules/3.2.x/cachedb_local.html" target="_blank">https://opensips.org/docs/modules/3.2.x/cachedb_local.html</a><br><br><br>      [2]:<br><br>      <a href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#toc4" target="_blank">https://www.opensips.org/Documentation/Script-CoreFunctions-3-2#toc4</a><br><br><br>      [3]: <a href="https://opensips.org/docs/modules/3.2.x/sql_cacher.html" target="_blank">https://opensips.org/docs/modules/3.2.x/sql_cacher.html</a></p></div><div><p><br><br><br>    </p><br><br>    <pre cols="72" style="font-family:monospace">-- <br><br>Liviu Chircu<br><br><a href="http://www.twitter.com/liviuchircu" target="_blank" style="font-family:monospace">www.twitter.com/liviuchircu</a> | <a href="http://www.opensips-solutions.com" target="_blank" style="font-family:monospace">www.opensips-solutions.com</a></pre><br><br>  </div><br><br><br><br>_______________________________________________<br><br>Users mailing list<br><br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br></blockquote></div></div>