Skip to content

feat(persist): add snapshot-based persistence layer with periodic flu… - #31

Merged
AlpherJang merged 1 commit into
mainfrom
29-save-data-to-storage
Mar 23, 2026
Merged

AlpherJang merged 1 commit into
mainfrom
29-save-data-to-storage

Conversation

@AlpherJang

Copy link
Copy Markdown
Contributor

…shing

  • Add persist package with Manager for periodic snapshot flushing and startup load
  • Implement Snapshotter interface in memory storage with Snapshot() and Restore() methods
  • Add initPersist() function to initialize persistence on startup with configurable directory and interval
  • Support PERSIST_DIR and PERSIST_INTERVAL environment variables for persistence configuration
  • Add compile-time check to ensure memory storage implements Snapshotter interface
  • Expose underlying storage backend via Store() method for interface assertions
  • Snapshot captures all non-expired items; Restore skips already-expired entries on load
  • Enables data durability across restarts with JSON-based snapshot serialization

…shing

- Add persist package with Manager for periodic snapshot flushing and startup load
- Implement Snapshotter interface in memory storage with Snapshot() and Restore() methods
- Add initPersist() function to initialize persistence on startup with configurable directory and interval
- Support PERSIST_DIR and PERSIST_INTERVAL environment variables for persistence configuration
- Add compile-time check to ensure memory storage implements Snapshotter interface
- Expose underlying storage backend via Store() method for interface assertions
- Snapshot captures all non-expired items; Restore skips already-expired entries on load
- Enables data durability across restarts with JSON-based snapshot serialization
@AlpherJang AlpherJang self-assigned this Mar 23, 2026
@AlpherJang AlpherJang added the enhancement New feature or request label Mar 23, 2026
@AlpherJang AlpherJang linked an issue Mar 23, 2026 that may be closed by this pull request
@AlpherJang
AlpherJang merged commit ce897d4 into main Mar 23, 2026
2 checks passed
@AlpherJang
AlpherJang deleted the 29-save-data-to-storage branch March 28, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

save data to storage

1 participant