Files
bolar_2/main/memory/memory_cache.h
2026-11-27 16:38:11 +08:00

25 lines
506 B
C++

#pragma once
#include "ports/memory_cache.h"
#include <mutex>
namespace borla {
class NvsMemoryCache final : public IMemoryCache {
public:
bool Load() override;
void CopySnapshot(MemorySnapshot* output) const override;
bool Update(const MemorySnapshot& snapshot) override;
private:
bool LoadNvsLocked();
bool LoadLegacyPartitionLocked();
bool SaveLocked(const MemorySnapshot& snapshot);
mutable std::mutex mutex_;
MemorySnapshot snapshot_{};
};
} // namespace borla