added caching for bttv and ffz api requests
This commit is contained in:
@@ -65,6 +65,7 @@ void BTTVEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr<uti
|
||||
util::NetworkRequest req(url);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.setTimeout(3000);
|
||||
req.setUseQuickLoadCache(true);
|
||||
req.getJSON([this, channelName, _map](QJsonObject &rootNode) {
|
||||
auto map = _map.lock();
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ void FFZEmotes::loadGlobalEmotes()
|
||||
util::NetworkRequest req(url);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.setTimeout(30000);
|
||||
req.setUseQuickLoadCache(true);
|
||||
req.getJSON([this](QJsonObject &root) {
|
||||
auto sets = root.value("sets").toObject();
|
||||
|
||||
@@ -88,6 +89,7 @@ void FFZEmotes::loadChannelEmotes(const QString &channelName, std::weak_ptr<util
|
||||
util::NetworkRequest req(url);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.setTimeout(3000);
|
||||
req.setUseQuickLoadCache(true);
|
||||
req.getJSON([this, channelName, _map](QJsonObject &rootNode) {
|
||||
auto map = _map.lock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user