working copy of gae version with memcache