I would be wary of using any cache for program control. You have no
guarantees that because you asked for something to be cached for 5
minutes that it will actually be cached for 5 minutes, it may actually
fall out of the cache immediately and therefore you cannot rely on it
for any sort of program control. It is probably best to just use the
cache for caching, and find another mechanism to track your users.

Grant



On Jan 28, 6:25 am, Satoshi <satoshi.nakaj...@gmail.com> wrote:
> 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 google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to