def updateMemcache(self): if not memcache.add(self.userid, self): memcache.replace(self.userid, self)