| 18 | |
| 19 | namespace smoke_api::cache { |
| 20 | std::vector<DLC> get_dlcs(AppId_t app_id) noexcept { |
| 21 | try { |
| 22 | LOG_DEBUG("Reading cached DLC IDs for the app: {}", app_id); |
| 23 | |
| 24 | const auto apps = get_cached_apps(); |
| 25 | |
| 26 | return DLC::get_dlcs_from_apps(apps, app_id); |
| 27 | } catch(const std::exception& e) { |
| 28 | LOG_ERROR("Error reading DLCs from disk cache: ", e.what()); |
| 29 | |
| 30 | return {}; |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | bool save_dlcs(AppId_t app_id, const std::vector<DLC>& dlcs) noexcept { |
| 35 | static std::mutex section; |
no test coverage detected