-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Establish a dedicated cache package to decouple storage logic from the protocol. This includes a generic Cacher interface to allow for future storage implementations (e.g., memory or database) and a FileCacher for local filesystem persistence.
Tasks
- Create
internal/cache/cacher.go. - Define the
Cacherinterface withGet,Set, andIsExpiredmethods. - Implement the
FileCacherstruct and its logic. - Ensure thread-safe directory creation and file permissions.
Acceptance Criteria
- The
cachepackage is independent of theprotocolpackage. FileCachercorrectly persists strings to the disk.- TTL is respected when checking for cache validity.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request