Hi, >A lot of my controller methods are read-only (apart from the identity >management), and yet a new transaction is being created for every >single page load at the moment. > > At the moment TG doesn't offer you great control of this. I believe (not checked) that SA transactions are "lazy" - the begin is only issued when you actually use the database, which helps a little.
What you may be able to do is create your own scoped_session, and use that instead of the one TG creates. Write a decorator, probably with_transaction, that does the begin/commit/rollback/clear. You can then apply this just to the methods that need a transaction. Looking forward, in TG2 you will probably only get a transaction for POST/PUT/DELETE requests, not for others. Paul --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

