Keep It Simple, Stupid | |
PerlMonks |
practical aspects of sessions and stateby d_i_r_t_y (Monk) |
on Oct 17, 2000 at 04:27 UTC ( [id://37067]=perlquestion: print w/replies, xml ) | Need Help?? |
d_i_r_t_y has asked for the wisdom of the Perl Monks concerning the following question:
i've just been initiated into the wonderful world of
maintaining state and sessioning with the
Apache::Session module. Works great, though there is
a steep learning curve on the more practical aspects
of sessioning.
My question relates to the most practical way to keep multiple sessions open at one time, such as when the user may have multiple browser windows open performing simultaneous queries and the like. The nature of the web site is that a user makes an initial query, but then can subquery the results of a previous query to refine their results. I am using a single session cookie to pass around a session id between scripts, however each invocation of a script with the same session id 'pollutes'/invalidates other currently open sessions. i am hesitant to take the approach of just storing every CGI request parameter in the one session hash, working out what query extends what query, and then artificially constructing the complete query from a 'cgi-parameter history'. i'm sure this could be done much better -- maybe by using a new session id for every request and keeping a reference to the 'parent' session for each request? how else does one spin off multiple derivative sessions without disturbing other existing/past sessions? wisened monks please advise... thanks, matt
Back to
Seekers of Perl Wisdom
|
|