mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Allow control of cache expiry interval (libtorrent 0.16.10 allocator can now return cache to kernel)
This commit is contained in:
parent
2647d9e994
commit
6b660d505c
3 changed files with 36 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue