Enabling Windows disk cache (and adding option to disable it) to prevent a relatively prevalent ERROR_INVALID_PARAMETER.

From my test only the write cache was the culprit, if this can be confirmed the read cache can be disabled by default if that has a benefit.

(Other systems are unchanged.)
This commit is contained in:
John Peterson
2012-12-03 17:22:40 +01:00
parent b2b959d5e3
commit 31ffbb1edd
3 changed files with 29 additions and 8 deletions

View File

@@ -934,6 +934,22 @@ public:
setValue(QString::fromUtf8("Preferences/Downloads/DiskCache"), size);
}
bool disableOSWriteCache() const {
return value(QString::fromUtf8("Preferences/Advanced/DisableOSWriteCache"), false).toBool();
}
void disableOSWriteCache(bool disable) {
setValue(QString::fromUtf8("Preferences/Advanced/DisableOSWriteCache"), disable);
}
bool disableOSReadCache() const {
return value(QString::fromUtf8("Preferences/Advanced/DisableOSReadCache"), false).toBool();
}
void disableOSReadCache(bool disable) {
setValue(QString::fromUtf8("Preferences/Advanced/DisableOSReadCache"), disable);
}
uint outgoingPortsMin() const {
return value(QString::fromUtf8("Preferences/Advanced/OutgoingPortsMin"), 0).toUInt();
}