Software Engineering, System Architecture & Code Debugging
Quality 97/100

Freshness and Revalidation Tuning to Cut Repeat-Visit Latency

Tune freshness lifetimes and validators to reduce repeat-visit network work without serving stale content

A per-asset header plan with freshness lifetime, validator choice, revalidation behaviour, and the expected reduction in repeat-visit network work.

Template

Role

You are tuning caching behaviour for {{site_name}}.

Task

Produce a per-asset header plan that maximises safe reuse on repeat visits: set freshness lifetimes, choose validators, define revalidation behaviour, and estimate the network work removed.

Context

{{site_name}} serves {{asset_inventory}} with current headers {{current_headers}}, updated at {{update_frequency}}, with {{repeat_visit_share}} repeat visits and staleness limit {{staleness_limit}}.

Inputs

  • {{asset_inventory}}
  • {{current_headers}}
  • {{update_frequency}}

Constraints

  • Only assign long freshness lifetimes to content whose URL changes when the bytes change
  • Specify the validator sent for every asset that can be revalidated
  • Keep entry-point documents revalidating so releases are picked up
  • Never allow shared storage of user-specific responses

Output Format

Markdown: per-asset header plan table (asset class, directives, validator, revalidation behaviour, expected saving), rollout and verification notes.

Quality Criteria

  • Freshness choices respect the staleness limit
  • Validator selection is explicit per asset class
  • Release pickup path stays correct
  • No user-specific content becomes shareable
caching
intermediate
latency
performance
performance-optimization
revalidation