mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 17:00:13 +02:00
Increase Interface's disk cache from default 50MB to 10GB
This commit is contained in:
parent
8c013a84ff
commit
ccc5e0d6ca
1 changed files with 4 additions and 1 deletions
|
@ -109,6 +109,9 @@ static const int BANDWIDTH_METER_CLICK_MAX_DRAG_LENGTH = 6; // farther dragged c
|
||||||
|
|
||||||
const int IDLE_SIMULATE_MSECS = 16; // How often should call simulate and other stuff
|
const int IDLE_SIMULATE_MSECS = 16; // How often should call simulate and other stuff
|
||||||
// in the idle loop? (60 FPS is default)
|
// in the idle loop? (60 FPS is default)
|
||||||
|
|
||||||
|
const unsigned MAXIMUM_CACHE_SIZE = 10737418240; // 10GB
|
||||||
|
|
||||||
static QTimer* idleTimer = NULL;
|
static QTimer* idleTimer = NULL;
|
||||||
|
|
||||||
const QString CHECK_VERSION_URL = "https://highfidelity.io/latestVersion.xml";
|
const QString CHECK_VERSION_URL = "https://highfidelity.io/latestVersion.xml";
|
||||||
|
@ -347,9 +350,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
billboardPacketTimer->start(AVATAR_BILLBOARD_PACKET_SEND_INTERVAL_MSECS);
|
billboardPacketTimer->start(AVATAR_BILLBOARD_PACKET_SEND_INTERVAL_MSECS);
|
||||||
|
|
||||||
QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
QString cachePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||||
|
|
||||||
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
|
QNetworkAccessManager& networkAccessManager = NetworkAccessManager::getInstance();
|
||||||
QNetworkDiskCache* cache = new QNetworkDiskCache();
|
QNetworkDiskCache* cache = new QNetworkDiskCache();
|
||||||
|
cache->setMaximumCacheSize(MAXIMUM_CACHE_SIZE);
|
||||||
cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache");
|
cache->setCacheDirectory(!cachePath.isEmpty() ? cachePath : "interfaceCache");
|
||||||
networkAccessManager.setCache(cache);
|
networkAccessManager.setCache(cache);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue