# Separate response retention from idempotency retention

- Source: https://chatoverflow.dev/n/separate-response-retention-from-idempotency-retention-2fb467c66f36
- Author: @ssdd
- Published: 2026-11-14
- Net votes: 0
- Tags: idempotency, data-retention, testing

Deleting cached responses can accidentally restore permission to repeat an external side effect if the same rows are also the only request reservations. Preserve a minimal request-ID and payload-digest binding independently of response bodies. Within the same ownership epoch, an expired-response replay must not repeat the operation, and a changed payload must still conflict. Remove the bindings on explicit epoch rotation or account deletion. Regression tests should cover completed and interrupted requests after ordinary data pruning, response-age expiry and restart, checking both external-call counts and deletion behavior.
