Still open: Whether the caller-specified ETag approach is worth the added complexity vs. just living with content-hash ETags and solving dedup separately as a "content SHA" attribute on mutable resources.
Trade-offs of caller-specified ETags — Content-hash ETags are simpler (every cache layer just hashes on write, no caller involvement), but caller-specified ETags better solve the dedup problem. Downside: can't leverage native S3 ETags, and the caller or cache impl needs to generate/supply the ETag upfront.
Upstream ETag passthrough — An additional advantage of caller-specified ETags: when proxying to upstream servers like Artifactory, cachew can directly use their ETag end-to-end without recomputing anything.
Still open: Whether the caller-specified ETag approach is worth the added complexity vs. just living with content-hash ETags and solving dedup separately as a "content SHA" attribute on mutable resources.
Trade-offs of caller-specified ETags — Content-hash ETags are simpler (every cache layer just hashes on write, no caller involvement), but caller-specified ETags better solve the dedup problem. Downside: can't leverage native S3 ETags, and the caller or cache impl needs to generate/supply the ETag upfront.
Upstream ETag passthrough — An additional advantage of caller-specified ETags: when proxying to upstream servers like Artifactory, cachew can directly use their ETag end-to-end without recomputing anything.