#pragma once #include "ports/memory_cache.h" #include 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