Documenting cache backends#90
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request improves developer-facing documentation for the memcache and layered storage backends (and adds a README comparison table) to make their TTL semantics, value formats, and cross-layer failure/consistency behavior explicit for users and maintainers.
Changes:
- Added a backend comparison table and expanded backend-specific caveats/semantics sections in
README.md. - Clarified
storage/memcache’s protobuf envelope storage format and TTL constraints in code comments. - Clarified
storage/layered’s sequential/non-transactional behavior, partial failure modes, and back-population error semantics in code comments.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Adds a backend comparison table plus detailed caveats for memcache and semantics/failure modes for layered. |
| storage/memcache/memcache.go | Documents protobuf value-envelope encoding and TTL constraints/behavior used by GetWithTTL. |
| storage/layered/layered.go | Documents sequential cross-layer operations, partial-apply behavior, and back-population error semantics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #90 +/- ##
=======================================
Coverage 88.22% 88.22%
=======================================
Files 9 9
Lines 501 501
=======================================
Hits 442 442
Misses 34 34
Partials 25 25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This pull request improves the documentation and code comments for the
layeredandmemcachebackends, clarifying their behavior, caveats, and consistency guarantees. The changes provide a new backend comparison table in theREADME.md, add detailed explanations of each backend's semantics, and enhance inline comments for maintainability and onboarding.Documentation improvements:
README.md, explaining TTL support, persistence, interoperability, and tradeoffs for each backend, as well as specific caveats formemcacheandlayeredbackends.Layered backend clarifications:
storage/layered/layered.goto clarify that operations are sequential (not transactional), partial failures are possible, and consistency is best effort/eventual. Also explained read, write, and delete semantics in detail. [1] [2] [3] [4] [5]Memcache backend clarifications:
storage/memcache/memcache.goto document that values are always stored as protobuf envelopes (not raw bytes), explain TTL handling and interoperability caveats, and describe the rationale behind value encoding/decoding. [1] [2] [3] [4] [5] [6]