Skip to content

feat: add cache-strategy bug scenario #4

Description

@jaeyeopme

Read-heavy endpoints hit the database on every request, even when the underlying data changes infrequently. At scale this creates unnecessary latency and DB load that a caching layer would eliminate.

The PRD hypothesis: Cache-Aside with TTL reduces read latency and DB load proportionally to cache hit rate.

Build a scenario that measures response times and query counts with no cache (baseline), then introduces Cache-Aside with Redis. Explore TTL tuning, cache invalidation on writes, and the thundering herd problem when popular keys expire simultaneously.

Integration tests should verify: cached reads skip the DB, writes invalidate stale entries, and TTL expiry triggers a fresh read. Benchmarks quantify latency reduction at various hit rates. Standard module structure, AC-1 through AC-5.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions