Hey there

For latency reasons we cache frequently fetched datastore entities:
http://code.google.com/appengine/articles/scaling/memcache.html#entity_cache

*def getProfile(id):*
*  profile = memcache.get(id)*
*  if not profile:*
*    profile = datastore.get(id)*
*    memcache.put(profile)*
*  return profile*
*
*
So we first check if we can get it from memcache,
if not we get it from datastore and put it into memcache.
Simple. In many cases the a profile is not in memcache,
because we have a lot of profiles. So we do 3 RPCs.

Looking a bit at appstats it seems that these days a
datastore.get_by_key_name is as fast as a memcache.get
in many cases, so I'm wondering if google has put a
memcache infront of datastore and the pattern I'm doing
above is obsolete and I could save the extra RPCs?

Or maybe datastore is just having a good day?

Cheers,
-Andrin

-- 
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