added caching for bttv and ffz api requests

This commit is contained in:
fourtf 2018-06-20 09:02:16 +02:00
parent e32841ab81
commit 107dc398a8
2 changed files with 3 additions and 0 deletions

View file

@ -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();

View file

@ -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();