Rework chache handling

* No longer provide multiple HTTP helper functions with the same name
* Default to cache not being used
* Explicitly use the cache for certain Twitch actions and conditions
* Clear caches on shutdown to avoid leaks being reported
This commit is contained in:
WarmUpTill
2025-03-13 19:29:26 +01:00
committed by WarmUpTill
parent d670b6d07e
commit 34e125f82d
5 changed files with 95 additions and 61 deletions

View File

@@ -37,7 +37,7 @@ std::string TwitchChannel::GetUserID(const TwitchToken &token) const
}
auto res = SendGetRequest(token, "https://api.twitch.tv",
"/helix/users", {{"login", _name}});
"/helix/users", {{"login", _name}}, true);
if (res.status == 400) {
userIDCache[_name] = "invalid";