T1MOXA Posted January 29, 2018 Report Posted January 29, 2018 Good evening.I noticed that user data is cached.For example: community.getSteamUser(steamID), (err, user) => { console.log(user.groups); });Will output the same data until I restarted the bot.Is there a way to disable this cache ? Quote
Dr. McKay Posted January 30, 2018 Report Posted January 30, 2018 If it's cached, then it's cached by Steam. Quote
T1MOXA Posted January 30, 2018 Author Report Posted January 30, 2018 Thanks for the reply.And it is impossible to disable ? Quote
PonyExpress Posted October 14, 2022 Report Posted October 14, 2022 I had this problem. Data from pages like https://steamcommunity.com/profiles/76561198054394425/?xml=1 are cached both in a regular browser and in nodeJS. And as a result, the function getSteamUser can return old data. I don't know how to disable caching in nodeJS. I used quite simply another solution. \node_modules\steamcommunity\classes\CSteamUser.js Quote this.httpRequest("http://steamcommunity.com/" + (typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()) + "/?xml=1&random=" + Date.now(), function(err, response, body) { Tests: community.getSteamUser(new SteamID("76561198125730690"), (error, user) => { if (error) { console.log(error) } else { console.log(user.privacyState) } }) Results, without fix: public // Here I make the profile private public With fix: private // Here I make the profile public public // Here I make the profile for friends only friendsonly Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.