Update max write cache size to 2048MB and set it to automatic by default (closes #148)

This commit is contained in:
Christophe Dumez 2012-10-07 19:14:53 +03:00
parent 6cf2f942e7
commit aeb5fa036c
3 changed files with 19 additions and 7 deletions

View file

@ -402,7 +402,8 @@ void QBtSession::configureSession() {
sessionSettings.announce_to_all_trackers = announce_to_all;
sessionSettings.announce_to_all_tiers = announce_to_all;
sessionSettings.auto_scrape_min_interval = 900; // 15 minutes
sessionSettings.cache_size = pref.diskCacheSize()*64;
int cache_size = pref.diskCacheSize();
sessionSettings.cache_size = cache_size ? pref.diskCacheSize() * 64 : -1;
qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB";
// Disable OS cache to avoid memory problems (uTorrent behavior)
#ifdef Q_WS_WIN