Hi Satoshi,

The memcache timers do not get reset when you get() a value, so you'll have
to do as you suggested and set() the timer each time the user accesses your
site.

Nick


2010/1/28 Satoshi <[email protected]>

> I am building a social network site, which involves a lot of
> activities by users. I am using memcache to keep track of "who is
> online". Whenever a user access my site, I store some user information
> (name, etc.) to memcache using the user id as the memcache key. By
> making the memcache timer short (a few minutes), I am able to quickly
> detect a particular user is on-line or not.
>
> In order to fully optimize this algorithm, I would like to know if the
> memcache timer (started as the result of previous memcache.set) will
> be reset when I call memcache.get or not.
>
> If memcache.get does reset the timer, I will simply call memcache.get
> each time the user accesses the site, and do nothing if it succeeds
> (and call memcache.set if it fails).
>
> If it does not, I need to call memcache.set whenever the user access
> the site (to explicitly reset the timer).
>
> I'd appreciate your help.
> Satoshi
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.

Reply via email to