[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Requests using If-Modified-Since cause response Set-Cookie to be  discarded
From:       will trillich <will () serensoft ! com>
Date:       2001-06-29 17:09:54
[Download RAW message or body]

On Wed, Jun 27, 2001 at 10:59:16AM -0700, Rob Bloodgood wrote:
> > me, on the other hand, i don't see the problem with
> >
> > 	on incoming request
> > 	  if has-cookie 'session'
> > 	  {
> > 	    update serverside 'accesstime' for session[this] to NOW
> 		^^^^^^^^^^^^^^^^
> 		Oh yeah?  HOW???

$dbh->do("update sesssion_rec set visit = ? where id = ?",time,$session{id});

or maybe even just

$session{when} = time;

> > 	    if not-modified-since
> > 	      report same
> > 	    else {
> > 	      send headers w/ cookie
> > 	      generate page
> > 	    }
> > 	  }
> > 	  else
> > 	    redirect to login page
> >
> > doesn't look unmanageable to me (until someone shows me the
> > light, of course)...?
> 
> How many sessions/day are you running?  How big is your DB?  How much
> processor do you have to throw at this? (these are the hurdles for storing
> serverside info).

maybe it doesn't scale well, i don't know; it works well for our
purposes. at least you don't have to worry about being unable to
send a new cookie on 'no-changes-since...'. just use the session
id of the existing cookie to 'touch' the session record, updating
the timestamp.

but maybe it's trickier than that for some cases...?

> OTOH, what *benefit* is derived from storing all of this stuff serverside?

"all" in this case is 'timestamp-of-last-request'.

-- 
I'd concentrate on "living in the now" because it is fun
and on building a better world because it is possible.
	- Tod Steward

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic