cancel the request||doc136053

September 20, 2022

Format

 UserInfoCache.CancelRequest(session) 

Description

Cancel the request to load user data.


Parameters

Variable name type Description
session int request index


Code Samples

local userIds = { 18512 }
local timer
local session = UserInfoCache.LoadCacheByUserIds(userIds, function ()
    if timer then
        timer()
    end
end)
if session then
    timer = World.Timer(100, function ()
        print("timeout", session, table.concat(userIds, ","))
        UserInfoCache.CancelRequest(session)
    end)
end