Get user cache data||doc136054

September 20, 2022

Format

 UserInfoCache.GetCache(userId) 

Description

Get cache information by user id. To get user data that is not in the game, it needs to be loaded firstLoadCacheByUserIds, otherwise it cannot be obtained.


Parameters

Variable name type Description
userId int userid


Value Returned

type Description
table User Info


User information content

Field Name type Description
country string nation
name string name
picUrl string Avatar link
userId int PlatformId
language string language
sex int Gender (1: male, 2: female)


Code Samples

local cache = UserInfoCache.GetCache(18512)