[PonyORM-list] Pony's Cache Size Limit?
Alexander Kozlovsky
alexander.kozlovsky at gmail.com
Thu Nov 6 13:05:24 UTC 2014
Hi Matthew,
> Does Pony's in-memory cache have a size limit?
Currently no, but we can think about it. It may be not so easy to
implement, because objects in cache have cross-relations.
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?
> I have a function which does a lot of queries within one transaction
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.
On Thu, Nov 6, 2014 at 3:43 PM, Matthew Bell <matthewrobertbell at gmail.com>
wrote:
> Hi,
>
> 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.
>
> Psuedo code:
>
> results = []
> for i in range(5):
> results.append(some_function_which_queries_lots(i))
>
> Thanks!
>
> --
> Regards,
>
> Matthew Bell
>
> _______________________________________________
> ponyorm-list mailing list
> ponyorm-list at ponyorm.com
> /ponyorm-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </ponyorm-list/attachments/20141106/eafb6177/attachment.html>
More information about the ponyorm-list
mailing list