This one time, at band camp, Michael Bayer wrote: >the "threadlocal" mod was meant primarily as a migration path from >the 0.1 series where such behavior was the default, and should >probably not even be used for new projects, in favor of the >sessioncontext plugin which is more generic and less magical. >sessioncontext is more explicit, and compared to threadlocal fits >well into the "explicit is better than implicit" idea. > >even better would be to keep threadlocal/sessioncontext out of the >tutorials altogether, sticking to basic explicit session usage and >leaving the usage of those plugins to those who have read and >understood the documentation on the SA site. (that or, build a >contextual session into Pylons the way the turbogears folks do, so >that theres a single pattern of SA session usage within Pylons which >is unique to Pylons and wont as easily be confused with generic SA >session usage).
Mike, Could you come up with some exapmles of how to use SessionContext? I've just migrated two sites away from explicit sessions, because I was getting random occurrences of the session disappearing from under the objects, and breaking lazy loading... I don't know too much about the details, but moving to threadlocal has fixed the problem (in as much as I now can't replicate it, though I'm not actually sure it's fixed). Anyway, I've been experimenting with various session patterns and so far, threadlocal appears to be the easiest! I'd really like to see some concrete examples of non-threadlocal sessions, especially SessionContext, in either SA documentation or in the Pylons community -- so far the only SA docs at all in Pylons are the QuickWiki pages :/ (I'd be in favour of a Pylons-recommended-but-not-enforced session usage best practice that could go into the Pylons project template :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss -~----------~----~----~----~------~----~------~--~---
