[horde] memcache session tracking
Michael M Slusarz
slusarz at horde.org
Tue Oct 14 17:43:50 UTC 2008
Quoting Andrew Morgan <morgan at orst.edu>:
> Should I merge the change in v1.24 of SessionHandler/memcache.php as well?
It would not hurt. The main differences is that we do explicitly do
garbage collection right before we provide a list of Session IDs, and
we completely honor the 'track_lifetime' param which speeds things up
considerably. This second change does mean that if a user is still
logged in after 'track_lifetime', their session will no longer be
counted although this has nothing to do with their actual session data
(since it is updated every time the session is written).
Looking at this code, it is safe to merge back to FW_3, which I will
do shortly.
> I was looking at the following code in SessionHandler/memcache.php:
>
> function _trackGC()
> {
> $this->_memcache->lock($this->_trackID);
> $ids = $this->_memcache->get($this->_trackID);
> if (empty($ids)) {
> return;
> }
>
> Shouldn't it call unlock in the "if (empty($ids))" block? If the
> tracking array is empty (but exists), then a lock will be held on it
> unnecessarily.
You are right - I have fixed this.
michael
--
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the horde
mailing list