Web platform

Cache strategies

A cache strategy chooses when to read stored responses and when to request fresh content. Different assets need different freshness rules.

Ask the Web platform assistant 1 min read · Updated September 9, 2026

What it is

A cache strategy chooses when to read stored responses and when to request fresh content. Different assets need different freshness rules.

Why it matters

A model with a content-versioned URL can be reused; an editable HTML page should get a chance to update.

Example

Use cache-first for versioned model bytes, network-first for navigation, and a bounded fallback if the network fails.

Technical detail

Stale-while-revalidate returns a cached response immediately while updating it in the background. The update must be tied to the event lifetime.

When to use it

Do not cache failed responses, sensitive API writes, or partial range responses as full files.

Go deeper

Sources

More in Web platform

Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.