Emit ETags and immutable cache-control on all cacheable responses #18

Closed
opened 2026-07-01 00:57:57 +00:00 by manlycucumber · 1 comment
manlycucumber commented 2026-07-01 00:57:57 +00:00 (Migrated from github.com)

Problem

Cloudflare should cache everything with long immutable TTLs, and clients should revalidate cheaply. Every cacheable response needs a stable ETag and correct cache-control headers.

Acceptance criteria

  • Cacheable responses include a content-derived ETag that is stable for identical payloads.
  • Responses set long, immutable cache-control headers.
  • Conditional requests with a matching If-None-Match return 304 with no body.
  • ETag and 304 behavior are covered by tests.

Notes

ETags must be derived from the canonical payload so static and dynamic paths match.

## Problem Cloudflare should cache everything with long immutable TTLs, and clients should revalidate cheaply. Every cacheable response needs a stable ETag and correct cache-control headers. ## Acceptance criteria - [ ] Cacheable responses include a content-derived ETag that is stable for identical payloads. - [ ] Responses set long, immutable cache-control headers. - [ ] Conditional requests with a matching `If-None-Match` return 304 with no body. - [ ] ETag and 304 behavior are covered by tests. ## Notes ETags must be derived from the canonical payload so static and dynamic paths match.
manlycucumber commented 2026-07-03 05:57:40 +00:00 (Migrated from github.com)

Delivered in #136 (squash-merged to develop).

Delivered in #136 (squash-merged to `develop`).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Directorium/Api#18
No description provided.