Versions in this module Expand all Collapse all v1 v1.4.1 Jul 26, 2026 v1.1.0 Jul 21, 2026 Changes in this version + const MaxKeyLength + const StaleClaimWindow + const SweepInterval + const TTL + func HashBody(body []byte) string + func HashRequest(path string, body []byte) string + type CachedResponse struct + Body []byte + ContentType string + StatusCode int + type ClaimOutcome int + const OutcomeAcquired + const OutcomeInFlight + const OutcomeMismatch + const OutcomeReplay + type ClaimResult struct + Cached CachedResponse + Outcome ClaimOutcome + type Store struct + func NewStore(pool *pgxpool.Pool) *Store + func (s *Store) Claim(ctx context.Context, userID, key, path, bodyHash string) (ClaimResult, error) + func (s *Store) Complete(ctx context.Context, userID, key string, resp CachedResponse) error + func (s *Store) CompleteTx(ctx context.Context, tx pgx.Tx, userID, key string, resp CachedResponse) error + func (s *Store) Release(ctx context.Context, userID, key string) error + func (s *Store) Sweep(ctx context.Context) (int64, error)