<div dir="ltr">Hi Matthew,<br><br>> <span style="font-family:arial,sans-serif;font-size:13px">Does Pony's in-memory cache have a size limit?</span><br><br>Currently no, but we can think about it. It may be not so easy to implement, because objects in cache have cross-relations.<br>May be we can add some method like db_session.forget(MyEntity) to clear all unmodified entities of this type from the cache. Can this help in your case?<br><br>> <span style="font-family:arial,sans-serif;font-size:13px"> I have a function which does a lot of queries within one transaction</span><br><br>Are you sure that in your case all those queries must be done in the same transaction? If not, then wrap different queries in different db_sessions, and old objects should be cleared automatically.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 6, 2014 at 3:43 PM, Matthew Bell <span dir="ltr"><<a href="mailto:matthewrobertbell@gmail.com" target="_blank">matthewrobertbell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>Does Pony's in-memory cache have a size limit? I have a function which does a lot of queries within one transaction, dereferencing > 99% of the pony objects, but the memory used by the process grows and grows and the function goes through its loops.<br><br></div>Psuedo code:<br><br></div><div>results = []<br></div>for i in range(5):<br></div> results.append(some_function_which_queries_lots(i))<br><br></div>Thanks!<span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><div><div><div><div><br>-- <br><div>Regards,<br><br>Matthew Bell<br></div>
</div></div></div></div></div></div></font></span></div>
<br>_______________________________________________<br>
ponyorm-list mailing list<br>
<a href="mailto:ponyorm-list@ponyorm.org">ponyorm-list@ponyorm.org</a><br>
<a href="/ponyorm-list" target="_blank">/ponyorm-list</a><br>
<br></blockquote></div><br></div>