On Mar3, 10:36pm, mdipierro <[email protected]> wrote: > > On Mar 2, 8:33 pm, Iceberg <[email protected]> wrote: > > > On Mar2, 12:22pm, mdipierro <[email protected]> wrote: > > > > Lots of small bug fixes in the last week so I posted 1.57. Please give > > > it a try and let me know. > > > > New features include: > > > 3) fixed (hopefully) a problem with database connections occasionally > > > not closed > > > > Massimo > > > In one of my app, I store search results in session like this: > > session.orders=db(condition).select(orderby=...) > > and later reuse the result set without db query. > > > This always works but, in 1.57, the result can not be obtained from > > session. Is there any change in dal causing the result can not be > > pickled into session anymore?
> this > session.orders=db(condition).select(orderby=...) > was never supposed to work. > Because connections close when the action returns and a list of record > only lives as long as the connection is open. > > Massimo Thanks for the explanation. So I think I can and have to change the code to something like this: cache.ram(response.session_id, lambda: db(condition).select(...), time_expire=...) Perhaps another doc page is good for new comers, "what is correct way to cache session-wide db search result"...... By the way, because my wrong usage worked since web2py 1.45, so I guess one thing you said about web2py 1.57 is NOT true: "3) fixed (hopefully) a problem with database connections occasionally not closed" is actually: "3) fixed (hopefully) a problem with database connections NEVER closed" Do get me wrong, you do not need to maintain "backward compatability" for this bad usage! :-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

