Modified to run in SDK. Has a problem of stale memcache