On Sun, Apr 11, 2010 at 4:32 PM, Steve Schwarz <steve@agilitynerd.com> wrote:
On Sun, Apr 11, 2010 at 4:23 PM, Christoph Zwerschke <cito@online.de> wrote:
Am 15.03.2010 19:38 schrieb Steve Schwarz:
> I've written a memcached based Session that others might find useful.
> Feel free to use as you wish.

I had some time today to try it out. Works nicely. I have added some
improvements (namespaces, clear() and some more methods) and tests.
Committed to the 1.1. branch now.
Christoph,
I took a look at the commit and I think the namespace idea is a good enhancement. We use separate memcached servers only for session data so it hasn't been an issue for us.

However I'm concerned by the added code/complexity required to support clear(). In our usage of the memcached session store users are moved between servers based on load. So if the sessions are cleared on one appserver what mechanism is used to trigger the other servers to call getCounter() and reset their notion of the session counter? Similarly if an appserver restarts it will get the latest session namespace key but appservers that didn't call clear() won't have the latest session namespace key.

I'd much rather the session store fail early and raise an exception if you try to clear(). The less code in the session implementation the safer I'd feel.

Best Regards,
Steve