thoughts about SessionCache

Mike Hardy mhardy@h3c.com
Wed, 30 Jan 2002 19:54:36 -0800 (PST)


I'm chasing through the Horde code looking for something else right now
but saw the "SessionCache" and it caught my eye because it solved I've a
problem I've had a couple times, but it solved it a different way.

First, I'm assuming that the cache is there to stop the problem the web
has where you never when a user is going to click out of your intended
page graph and orphan a session variable before you get a chance to
unregister it. Is that right?

If so, then I'll say for contrast, the way I've solved this problem in the
past is actually encoding, in a set of arrays, the various session
variables that are allowable, and the pages that they belong on. Then you
make the assumption that if you see a variable on a page that it doesn't
belong, you can auto-unregister it.

Maintaining the list of variables and pages isn't the neatest thing in the
world to do, but this design is the only way I've thought of that
guarantees you won't orphan session data. That's a big deal when scaling
to very large sites, and its bitten me before, anyway.

Perhaps a script could automate the process of getting session variables
names and matching them the pages they're deserialized on to make that
process non-error-prone.

I'm still not sure the pain of maintenance would be worth it for smaller
sites, but is there any better solution that's guaranteed?

-Mike



>From chuck@horde.org Date: Sat,  2 Feb 2002 00:51:04 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 88891 invoked from network); 2 Feb 2002 05:51:42 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 2 Feb 2002 05:51:42 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 7B66E3CA1; Sat,  2 Feb 2002 00:51:04 -0500 (EST)
Received: from 192.168.0.116 ( [192.168.0.116])
	as user chuck@localhost by marina.horde.org with HTTP;
	Sat,  2 Feb 2002 00:51:04 -0500
Message-ID: <1012629064.3c5b7e48531f8@marina.horde.org>
Date: Sat,  2 Feb 2002 00:51:04 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: dev@lists.horde.org
References: <Pine.GSO.4.21.0202011630090.4272-100000@carousel.tabcat.com>
In-Reply-To: <Pine.GSO.4.21.0202011630090.4272-100000@carousel.tabcat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [dev] error still there /horde/turba new search after failed results

Quoting Apis Hytt <php3dev@carousel.tabcat.com>:

> NOJOY==>  The error is back there .. I checked with user.  One has
> 		to change address books.  Also, the first results
> 		disappeared when addressbook was changed and new search
> 		gives errors with second addressbook.

Try latest CVS.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin