def take_ownership(object): object.owner = users.get_current_user() object.put() if isinstance(object, Request): query.bust_request_caches() object.push.bust_requests_cache() elif isinstance(object, Push): query.bust_push_caches() return object
def put(self): try: return super(Push, self).put() finally: query.bust_push_caches()