Commit 84ea21c
authored
feat(code.gs): optional spreadsheet-backed response cache with TTL (#443)
Adds optional Sheets-backed response cache to Code.gs. By @euvel.
All five review suggestions from #400 addressed:
- TTL-aware caching (Cache-Control max-age, no-cache, no-store, private)
- 35 KB body-size gate (under Sheets cell limit)
- Header rewriting on cache hit (Date, Age, Cache-Control, X-Cache, X-Cached-At)
- Circular buffer for O(1) writes (no appendRow/deleteRows reindexing)
- Vary-aware compound cache keys (Accept-Encoding, Accept-Language)
Opt-in via single constant. Zero overhead when disabled. No breaking changes.1 file changed
Lines changed: 477 additions & 3 deletions
0 commit comments