#pragma once #include #include /** @brief cache storage manager */ class CacheManager { private: std::string cache_path; /** @brief currently opened cache location */ std::vector files; public: /** @brief initialize CacheManager class at `cache_path` */ CacheManager(const char* cache_path); CacheManager(std::string cache_path); /** @brief close cache */ virtual ~CacheManager(); /** @brief create cache folder structure */ virtual void init_cache(); /** @brief update cache date */ virtual void update_cache(); /** * @brief check cache file structure * * automatically updates chache if stale and/or creates cache when * non-existant */ virtual void verify_cache(); /** @brief get fstream for file in cache or create file */ virtual std::fstream* cache_get(const char* filename); uint64_t age; /** @brief currently opened cache update unix timestamp */ };