On stopthespin.com (my pylons site) we track whoever last logged on.
It's not quite what you're asking for, but a cheap way to get a
similar result.

Cheers,
Tom Longson
http://stopthespin.com/

On Tue, Mar 10, 2009 at 9:54 AM, Jonathan Vanasco <[email protected]> wrote:
>
> that would be a bit of overhead too -- you'd be constantly doing reads/
> writes
>
> personally, i'd do this:
>
> 1) use a db table to maintain a list of all the people logged in as:
> [ (uid,displayname,timestamp_last_action), repeat ]
> 2) when someone logs in / out - modify that entry , have pylons check
> every so often to clear old items
> 3) have a hook on your display function that uses myghty cache set to
> memcached , and cache that data for 2 minutes or so.  you could even
> use a local memory cache.
>
> why?
> with something like this, you'd have very little db access - and you'd
> never have to hit a file or a db 99% of the time.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to