noCV
PCACHE-102 · Define cache meaning and baseline

Measure saved origin work instead of celebrating the hit ratio

Practice briefTaskFoundational

The cache reports a high hit ratio, but every hit still triggers a synchronous origin validation and costs almost as much as a miss.

Focused work estimate
1h 30m + prerequisites
Priority in the scenario
Medium
Engineering practice
Cache measurement · Latency analysis

Estimated field mix

  • Performance engineering100%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional equipment-rental service caches availability summaries. A campaign sends repeated reads, while stock updates and shared expiry times create bursts against the origin. Build a local origin stub and cache-backed read API using synthetic depots and products.

Setup prerequisites

  • Create a deterministic local availability origin and Redis-backed reader with synthetic tenant, depot and product data.
  • Use a seeded hot-key distribution and controlled time; record cache capacity, TTLs, runtime and machine limits.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Record hits, misses, stale responses, origin calls, origin work duration and end-to-end request latency separately.
  • Use bounded labels and report the same workload window and request counts for all rates.
  • Define avoided origin calls against an uncached run of the identical seeded requests.

Implementation constraints

  • Do not combine cache and origin error outcomes into successful hits; expose failures and retries explicitly.

Verification to include

  • Replay a repeated-key fixture and reconcile request count with cache outcomes and actual stub calls.
  • Enable synchronous validation deliberately and verify the report reveals that high hit rate did not remove origin work.

Deliverables

  • Cache effectiveness report and aggregate counters

Rollout and recovery

Run counters beside the existing local behavior before policy changes; preserve raw attempt counts for comparisons.

Value of the work

For the engineer: Learn to evaluate caching through avoided work, bounded staleness, concurrency and recovery rather than hit rate alone.

For the team: Produce a reviewable cache policy and failure exercise for a read-heavy service with changing business data.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.