mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Allow control of cache expiry interval (libtorrent 0.16.10 allocator can now return cache to kernel)
This commit is contained in:
@@ -422,6 +422,9 @@ void QBtSession::configureSession() {
|
||||
sessionSettings.auto_scrape_min_interval = 900; // 15 minutes
|
||||
int cache_size = pref.diskCacheSize();
|
||||
sessionSettings.cache_size = cache_size ? cache_size * 64 : -1;
|
||||
#if LIBTORRENT_VERSION_NUM >= 001610
|
||||
sessionSettings.cache_expiry = pref.diskCacheTTL();
|
||||
#endif
|
||||
qDebug() << "Using a disk cache size of" << cache_size << "MiB";
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
sessionSettings.anonymous_mode = pref.isAnonymousModeEnabled();
|
||||
|
||||
Reference in New Issue
Block a user