#pragma once #include "HTTPClient.h" #include "IDownloader.h" #include #include #include #include #include #include class CachedDownloader : public IDownloader { public: CachedDownloader(const boost::filesystem::path& cacheDir, HTTPClient& httpClient); public: boost::filesystem::path download(const std::string& url) override; void clearCache(); private: boost::filesystem::path m_cacheDir; std::map m_cache; HTTPClient& m_httpClient; };