you should be able to also store the results in a cache. But perhaps the session is better in this case
On Tue, Jun 30, 2009 at 2:57 AM, Richard<[email protected]> wrote: > > do you mean caching the database query? That might help, but > constructing the dictionary from the query also takes a lot of > operations. > > > On Jun 30, 1:11 am, Hans Donner <[email protected]> wrote: >> or store the data in cache? >> >> On Mon, Jun 29, 2009 at 3:43 PM, cjparsons<[email protected]> wrote: >> >> > Session data is normally stored on disk in the "sessions" folder in >> > python pickle format - only the session id is transferred over the >> > network connection between the client and the server. (I say >> > "normally" because there is also an option to store session data in >> > the database, though this has to be enabled). >> >> > If you scale your application up to more than one server you'll >> > obviously have to consider how the session folder is shared between >> > servers, or make sure the same session is always served by the same >> > machine. >> >> > On Jun 29, 8:10 am, Richard <[email protected]> wrote: >> >> hello, >> >> >> I have a Python dictionary that is unique to each user and takes a >> >> rather heavy database query to instantiate. Is there a way to maintain >> >> the state of this dictionary between requests? For example, is saving >> >> it in the session variable a good idea? >> >> >> thanks, >> >> Richard > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

