From 58d0424dfc47e99c9c21396819a2234df158b4d0 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Thu, 17 Dec 2020 01:40:02 -0500 Subject: abstract away settings some more --- filecache.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'filecache.cpp') diff --git a/filecache.cpp b/filecache.cpp index 2b454f6..3997156 100644 --- a/filecache.cpp +++ b/filecache.cpp @@ -2,8 +2,6 @@ #include "filecache.hpp" #include "murmurhash3.h" -constexpr static const int MaxConcurrentCacheHTTP = 10; - Cache::Cache() { m_tmp_path = std::filesystem::temp_directory_path() / "abaddon-cache"; std::filesystem::create_directories(m_tmp_path); @@ -38,7 +36,7 @@ void Cache::GetFileFromURL(std::string url, callback_type cb) { // needs to be initialized like this or else ::Get() is called recursively if (!m_semaphore) - m_semaphore = std::make_unique(Abaddon::Get().GetSettings().GetSettingInt("http", "concurrent", MaxConcurrentCacheHTTP)); + m_semaphore = std::make_unique(Abaddon::Get().GetSettings().GetCacheHTTPConcurrency()); if (m_callbacks.find(url) != m_callbacks.end()) { m_callbacks[url].push_back(cb); -- cgit v1.2.3