Skip to content

Cache-Control decoration on GET /api/v1/campaigns, claims, audit logs #240

Description

@kilodesodiq-arch

Problem Statement. The HTTP-cache interceptor exists but only fires from the
controller decorator side. List endpoints haven't been adorned.

Why it matters. Dashboards refetch the same campaign list every minute. A correct
max-age=30 saves significant Prisma load.

Technical Context. @HttpCacheTtl(30) and @SkipHttpCache() decorators exist;
campaign, claim, audit-list endpoints do not use them.

Expected Outcome. All findAll-style GET endpoints decorated; an X-Edge-Cache-Status
returned in non-prod for debuggability.

Acceptance Criteria.

  • E2E test asserts GET /campaigns returns max-age=30 after first call.
  • A second call within the TTL returns 304 with X-Edge-Cache-Status: hit.

Files or modules likely to be affected. src/campaigns/campaigns.controller.ts,
src/claims/claims.controller.ts, src/audit/audit.controller.ts.

Dependencies. #31 (pagination).

Difficulty. Easy
Estimated effort. S



Backlog item #32 from `docs/maintainer-issue-backlog.md.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions