diff options
| author | Mike Skec <skec@protonmail.ch> | 2021-01-08 15:34:54 +1100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-01-08 11:12:14 +0100 |
| commit | 35756f7a1b49f8d7aa603dd3bbe3c0a2c2d234a6 (patch) | |
| tree | c9a8fd3bc483623cd1fa294ee8eb866dd189b93c /src/main.cpp | |
| parent | 443da5e34a3b858a2a32c6ca6846e351fa11f389 (diff) | |
| download | kristall-35756f7a1b49f8d7aa603dd3bbe3c0a2c2d234a6.tar.gz | |
cache: item expiry and max item size
currently no total limit yet
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5200ce3..a776a80 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -368,6 +368,10 @@ void GenericSettings::load(QSettings &settings) redirection_policy = RedirectionWarning(settings.value("redirection_policy ", WarnOnHostChange).toInt()); enable_home_btn = settings.value("enable_home_btn", false).toBool(); + + cache_limit = settings.value("cache_limit", 100).toInt(); + cache_threshold = settings.value("cache_threshold", 200).toInt(); + cache_life = settings.value("cache_life", 15).toInt(); } void GenericSettings::save(QSettings &settings) const @@ -398,6 +402,10 @@ void GenericSettings::save(QSettings &settings) const settings.setValue("redirection_policy", int(redirection_policy)); settings.setValue("network_timeout", network_timeout); settings.setValue("enable_home_btn", enable_home_btn); + + settings.setValue("cache_limit", cache_limit); + settings.setValue("cache_threshold", cache_threshold); + settings.setValue("cache_life", cache_life); } |
