feat: add cache cleaner

This commit is contained in:
2026-06-19 01:09:15 -03:00
parent 5c9e043ff3
commit df78edb1ce
2 changed files with 166 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <string>
#include <atomic>
#include <thread>
#include <seallib/log.h>
class CacheCleaner
{
public:
CacheCleaner();
~CacheCleaner();
void init();
void shutdown();
private:
std::string getLocalAppDataPath();
void clearFolder(std::string& path);
void monitorLoop();
std::atomic<bool> _running;
std::unique_ptr<std::thread> _monitorThread;
std::string _cacheDir;
seallib::Logger* _log;
};